Skip to content

Commit 2276824

Browse files
author
Matthew Fisher
committed
ref(controller): switch back to bash
1 parent fce5e8b commit 2276824

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

controller/api/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def _get_command(self):
406406
return ''
407407
try:
408408
# ensure they cannot break out and run commands on the host
409-
return "env '{}'".format(self.release.build.procfile[self.type])
409+
return "bash -c '{}'".format(self.release.build.procfile[self.type])
410410
# if the key is not present or if a parent attribute is None
411411
except (KeyError, TypeError):
412412
return 'start {}'.format(self.type)

controller/api/tests/test_container.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,9 @@ def test_command_good(self):
461461
release=release,
462462
type='web',
463463
num=1)
464-
self.assertEqual(c._command, "env 'node server.js'")
464+
self.assertEqual(c._command, "bash -c 'node server.js'")
465465
c.type = 'worker'
466-
self.assertEqual(c._command, "env 'node worker.js'")
466+
self.assertEqual(c._command, "bash -c 'node worker.js'")
467467
c.release.build.procfile = None
468468
self.assertEqual(c._command, 'start worker')
469469
c.type = 'cmd'

0 commit comments

Comments
 (0)