Fix bugs with entrypoint/command in docker-compose run
- When no command is passed but `--entrypoint` is, set Cmd to `[]` - When command is a single empty string, set Cmd to `[""]` Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
8f842d55d7
commit
2ecbf25445
6 changed files with 63 additions and 15 deletions
|
|
@ -670,8 +670,10 @@ class TopLevelCommand(object):
|
|||
'can not be used togather'
|
||||
)
|
||||
|
||||
if options['COMMAND']:
|
||||
if options['COMMAND'] is not None:
|
||||
command = [options['COMMAND']] + options['ARGS']
|
||||
elif options['--entrypoint'] is not None:
|
||||
command = []
|
||||
else:
|
||||
command = service.options.get('command')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue