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

Commit

Permalink
src: change to use /bin/sh instead of /bin/bash (#57)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: rykal-nate <[email protected]>
  • Loading branch information
3 people committed Jan 16, 2020
1 parent be903da commit 31ade31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func killProcess(theProcessType ProcessType, checkAttempts int) error {
*/
func runPrep(commandString string, interactive bool) (*exec.Cmd, error) {
var err error
cmd := exec.Command("/bin/bash", "-c", commandString)
cmd := exec.Command("/bin/sh", "-c", commandString)
ControllerDebug.log("Set workdir: " + workDir)
cmd.Dir = workDir
if interactive {
Expand All @@ -376,7 +376,7 @@ func runPrep(commandString string, interactive bool) (*exec.Cmd, error) {
*/
func startProcess(commandString string, theProcessType ProcessType, interactive bool) (*exec.Cmd, error) {
var err error
cmd := exec.Command("/bin/bash", "-c", commandString)
cmd := exec.Command("/bin/sh", "-c", commandString)
ControllerDebug.log("Set workdir: " + workDir)
cmd.Dir = workDir
if interactive {
Expand Down

0 comments on commit 31ade31

Please sign in to comment.