move bash flag to set statement (#3494)

Passing bash with flags to the first argument of /usr/bin/env requires
its own flag to interpret it correctly.  Rather than use `env -S` to
split the argument, have the script `set -e` to enable the same behavior
explicitly in preinst and postinst scripts.

Also set `-o pipefail` for consistency.

Closes: #3492

Signed-off-by: Cole White <cwhite@wikimedia.org>
This commit is contained in:
Cole White 2022-06-03 12:24:46 -06:00 committed by GitHub
parent feaa747a6b
commit 2fbf33555e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -1,2 +1,3 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -e -o pipefail
<% commands.each {command -> %><%= command %><% } %>

View File

@ -1,2 +1,3 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -e -o pipefail
<% commands.each {command -> %><%= command %><% } %>