diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-23 01:31:18 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-23 01:31:18 +0900 |
commit | 9164dbb5c375d586343361cfa4aacb6f489ba0ec (patch) | |
tree | 1ca94918c2840aebcab4a91bcfe1b1012b55d5ce /buildstream/buildelement.py | |
parent | 84638c30f713ef7c3ffca8cfb072c7cfaf47c794 (diff) | |
download | buildstream-9164dbb5c375d586343361cfa4aacb6f489ba0ec.tar.gz |
build-element.bst: Append newline to build commands run in sandbox
They are loaded with stripped whitespace, but when launching the command
sometimes having a newline can make a difference (especially when
doing cat > file << EOF ... EOF, the final EOF must have a newline)
Diffstat (limited to 'buildstream/buildelement.py')
-rw-r--r-- | buildstream/buildelement.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py index f753bdb9b..3e7335b37 100644 --- a/buildstream/buildelement.py +++ b/buildstream/buildelement.py @@ -102,7 +102,7 @@ class BuildElement(Element): # Note the -e switch to 'sh' means to exit with an error # if any untested command fails. # - exitcode, _, _ = sandbox.run(['sh', '-c', '-e', cmd]) + exitcode, _, _ = sandbox.run(['sh', '-c', '-e', cmd + '\n']) if exitcode != 0: raise ElementError("Command '{}' failed with exitcode {}".format(cmd, exitcode)) |