Skip to content

Commit

Permalink
move bash flag to set statement
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
shdubsh committed Jun 2, 2022
1 parent 0add9d2 commit f03e8fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion buildSrc/src/main/resources/deb/postinst.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -e -o pipefail
<% commands.each {command -> %><%= command %><% } %>
3 changes: 2 additions & 1 deletion buildSrc/src/main/resources/deb/preinst.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -e -o pipefail
<% commands.each {command -> %><%= command %><% } %>

0 comments on commit f03e8fd

Please sign in to comment.