Skip to content

Commit

Permalink
Make sure that Exec() runs commands with bash error checking, especia…
Browse files Browse the repository at this point in the history
…lly pipefail (#2295)
  • Loading branch information
rfay committed Jun 7, 2020
1 parent 6d8df73 commit b266ed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ddevapp/ddevapp.go
Expand Up @@ -977,7 +977,7 @@ func (app *DdevApp) Exec(opts *ExecOpts) (string, string, error) {
if !nodeps.ArrayContainsString([]string{"web", "db", "dba"}, opts.Service) {
shell = "sh"
}
exec = append(exec, shell, "-c", opts.Cmd)
exec = append(exec, shell, "-c", "set -eu -o pipefail && ( "+opts.Cmd+")")

files, err := app.ComposeFiles()
if err != nil {
Expand Down

0 comments on commit b266ed6

Please sign in to comment.