mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-20 19:45:00 +00:00
server: build: make script safer by failing on pipes
The bash shell normally only looks at the exit code of the last command of a pipeline. This behavior is not ideal as it causes the -e option to only be able to act on the exit code of a pipeline’s last command. This is where -o pipefail comes in. This particular option sets the exit code of a pipeline to that of the rightmost command to exit with a non-zero status, or to zero if all commands of the pipeline exit successfully. See more about safer bash scripts: https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ Signed-off-by: Luís Ferreira <contact@lsferreira.net>
This commit is contained in:
parent
1cf59187be
commit
f50d9dc23d
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
#
|
||||
# BUILD_DIR=my_build_dir ./build_without_gradle.sh
|
||||
|
||||
set -e
|
||||
set -eo pipefail
|
||||
|
||||
SCRCPY_DEBUG=false
|
||||
SCRCPY_VERSION_NAME=1.16
|
||||
|
|
Loading…
Add table
Reference in a new issue