Scriptlets should run with "-e" shell flag
Bug #1707189 reported by
James Henstridge
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
High
|
Sergio Schvezov |
Bug Description
As discussed on the forum, scriptlets should run with the "-e" shell flag (i.e. fail if any command returns non zero):
https:/
At the moment, if I put something like the following in my snapcraft.yaml, the build will succeed:
install: |
Execution continues past the first failed command, and the second successful command causes the scriptlet to return 0.
Situations like this almost always indicate a bug, and for the cases where the exit code should be ignored there are work arounds (e.g. run "set +e", or append "||:" to the end of the command).
Changed in snapcraft: | |
assignee: | nobody → Sergio Schvezov (sergiusens) |
Changed in snapcraft: | |
milestone: | none → 2.35 |
Changed in snapcraft: | |
status: | Triaged → In Progress |
Changed in snapcraft: | |
status: | In Progress → Fix Committed |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Importance set to high because this has made me dig through tons of logs trying to find the step that failed.