Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Commit 31ade31

Browse files
lancekylegcrykal-nate
committed
src: change to use /bin/sh instead of /bin/bash (#57)
Some container runtimes are intentionally constraned (e.g. alpine). In these cases, the container may not have `/bin/bash` on the system. This commit modifies the `runPrep` and `startProcess` functions to use `/bin/sh` instead of `/bin/bash`. See also: appsody/appsody#695 Co-authored-by: Kyle G. Christianson <christik@us.ibm.com> Co-authored-by: rykal-nate <57912892+rykal-nate@users.noreply.github.com>
1 parent be903da commit 31ade31

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ func killProcess(theProcessType ProcessType, checkAttempts int) error {
355355
*/
356356
func runPrep(commandString string, interactive bool) (*exec.Cmd, error) {
357357
var err error
358-
cmd := exec.Command("/bin/bash", "-c", commandString)
358+
cmd := exec.Command("/bin/sh", "-c", commandString)
359359
ControllerDebug.log("Set workdir: " + workDir)
360360
cmd.Dir = workDir
361361
if interactive {
@@ -376,7 +376,7 @@ func runPrep(commandString string, interactive bool) (*exec.Cmd, error) {
376376
*/
377377
func startProcess(commandString string, theProcessType ProcessType, interactive bool) (*exec.Cmd, error) {
378378
var err error
379-
cmd := exec.Command("/bin/bash", "-c", commandString)
379+
cmd := exec.Command("/bin/sh", "-c", commandString)
380380
ControllerDebug.log("Set workdir: " + workDir)
381381
cmd.Dir = workDir
382382
if interactive {

0 commit comments

Comments
 (0)