Skip to content

Commit

Permalink
move bash flag to set statement (#3494)
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 authored Jun 3, 2022
1 parent feaa747 commit 2fbf335
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 2fbf335

Please sign in to comment.