Skip to content

Commit 3f35bb1

Browse files
author
Victoria Campbell
committed
wip; debugging
1 parent d7e33f0 commit 3f35bb1

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

  • dependency/actions/compile/entrypoint/internal

dependency/actions/compile/entrypoint/internal/utils.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,10 @@ func RunCommands(command, workingDir string, envVars []string) error {
173173
cmd.Dir = workingDir
174174
cmd.Env = append(cmd.Environ(), envVars...)
175175

176-
// for debugging
177-
cmd.Stdout = os.Stdout
178-
cmd.Stderr = os.Stderr
176+
if debug() {
177+
cmd.Stdout = os.Stdout
178+
cmd.Stderr = os.Stderr
179+
}
179180

180181
err := cmd.Run()
181182
if err != nil {
@@ -184,3 +185,7 @@ func RunCommands(command, workingDir string, envVars []string) error {
184185

185186
return nil
186187
}
188+
189+
func debug() bool {
190+
return os.Getenv("DEBUG_PHP_COMPILE") == "true"
191+
}

0 commit comments

Comments
 (0)