Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: run cmd using the shell's -c flag #1273

Merged
merged 10 commits into from
Jan 1, 2024
3 changes: 1 addition & 2 deletions pkg/hooks/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,7 @@ func (h *Hook) processDockerEnv(appCmd, appContainer, appNetwork string, buildDe
// It runs the application using the given command
func (h *Hook) runApp(appCmd string, isUnitTestIntegration bool) error {
// Create a new command with your appCmd
parts := strings.Fields(appCmd)
cmd := exec.Command(parts[0], parts[1:]...)
cmd := exec.Command("sh", "-c", appCmd)

cmd.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
Expand Down