File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,13 @@ def _get_command(self, container_type):
123123 # FIXME: remove slugrunner's hardcoded entrypoint
124124 release = self .release_set .filter (failed = False ).latest ()
125125 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 ()
127133
128134 return ['start' , container_type ]
129135 # 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):
512512 # ensure we can override the cmd process type in a Procfile
513513 build .procfile ['cmd' ] = 'node server.js'
514514 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" ])
516518 self .assertEqual (app ._get_command ('worker' ), ["node worker.js" ])
517519
518520 # for backwards compatibility if no Procfile is supplied
You can’t perform that action at this time.
0 commit comments