This repository was archived by the owner on May 6, 2020. It is now read-only.
File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,13 @@ def _get_command(self, container_type):
123
123
# FIXME: remove slugrunner's hardcoded entrypoint
124
124
release = self .release_set .filter (failed = False ).latest ()
125
125
if release .build .dockerfile or not release .build .sha :
126
- return [release .build .procfile [container_type ]]
126
+ cmd = release .build .procfile [container_type ]
127
+ # if the entrypoint is `/bin/bash -c`, we want to supply the list
128
+ # as a script. Otherwise, we want to send it as a list of arguments.
129
+ if self ._get_entrypoint (container_type ) == ['/bin/bash' , '-c' ]:
130
+ return [cmd ]
131
+ else :
132
+ return cmd .split ()
127
133
128
134
return ['start' , container_type ]
129
135
# if the key is not present or if a parent attribute is None
Original file line number Diff line number Diff line change @@ -512,7 +512,9 @@ def test_command_good(self, mock_requests):
512
512
# ensure we can override the cmd process type in a Procfile
513
513
build .procfile ['cmd' ] = 'node server.js'
514
514
build .save ()
515
- self .assertEqual (app ._get_command ('cmd' ), ["node server.js" ])
515
+ self .assertEqual (app ._get_entrypoint ('cmd' ), [])
516
+ self .assertEqual (app ._get_command ('cmd' ), ["node" , "server.js" ])
517
+ self .assertEqual (app ._get_entrypoint ('worker' ), ["/bin/bash" , "-c" ])
516
518
self .assertEqual (app ._get_command ('worker' ), ["node worker.js" ])
517
519
518
520
# for backwards compatibility if no Procfile is supplied
You can’t perform that action at this time.
0 commit comments