From 100ab79eabffa1909f2fd9fe8ca2e4e202d756ef Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Thu, 1 Dec 2016 11:58:10 -0400 Subject: [PATCH] chore: exit with error code 1 on build script usage section (#916) We're currently exitting with error code 0 when displaying the usage information on build scripts, which means that if the user forgets or mistypes an option argument, the script will carry on its way. Signed-off-by: Juan Cruz Viotti --- scripts/darwin/configure-electron.sh | 2 +- scripts/darwin/installer-dmg.sh | 2 +- scripts/darwin/installer-zip.sh | 2 +- scripts/darwin/sign.sh | 2 +- scripts/linux/configure-electron.sh | 2 +- scripts/linux/installer-appimage.sh | 2 +- scripts/linux/installer-deb.sh | 2 +- scripts/unix/create-asar.sh | 2 +- scripts/unix/create-electron-app.sh | 2 +- scripts/unix/dependencies-npm.sh | 2 +- scripts/unix/download-electron.sh | 2 +- scripts/unix/package-cli.sh | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/darwin/configure-electron.sh b/scripts/darwin/configure-electron.sh index 5c8c9586..255ca691 100755 --- a/scripts/darwin/configure-electron.sh +++ b/scripts/darwin/configure-electron.sh @@ -47,7 +47,7 @@ function usage() { echo " -t " echo " -a " echo " -i " - exit 0 + exit 1 } ARGV_ELECTRON_DIRECTORY="" diff --git a/scripts/darwin/installer-dmg.sh b/scripts/darwin/installer-dmg.sh index a3d50614..621503f3 100755 --- a/scripts/darwin/installer-dmg.sh +++ b/scripts/darwin/installer-dmg.sh @@ -50,7 +50,7 @@ function usage() { echo " -i " echo " -b " echo " -o " - exit 0 + exit 1 } ARGV_APPLICATION_NAME="" diff --git a/scripts/darwin/installer-zip.sh b/scripts/darwin/installer-zip.sh index 74a17e55..314d578e 100755 --- a/scripts/darwin/installer-zip.sh +++ b/scripts/darwin/installer-zip.sh @@ -41,7 +41,7 @@ function usage() { echo "" echo " -a " echo " -o " - exit 0 + exit 1 } ARGV_APPLICATION="" diff --git a/scripts/darwin/sign.sh b/scripts/darwin/sign.sh index 874bdf38..dda16e1b 100755 --- a/scripts/darwin/sign.sh +++ b/scripts/darwin/sign.sh @@ -42,7 +42,7 @@ function usage() { echo "" echo " -a " echo " -i " - exit 0 + exit 1 } ARGV_APPLICATION="" diff --git a/scripts/linux/configure-electron.sh b/scripts/linux/configure-electron.sh index c34c96df..278e2bd4 100755 --- a/scripts/linux/configure-electron.sh +++ b/scripts/linux/configure-electron.sh @@ -42,7 +42,7 @@ function usage() { echo " -v " echo " -l " echo " -a " - exit 0 + exit 1 } ARGV_ELECTRON_DIRECTORY="" diff --git a/scripts/linux/installer-appimage.sh b/scripts/linux/installer-appimage.sh index a18ab59b..589edc8f 100755 --- a/scripts/linux/installer-appimage.sh +++ b/scripts/linux/installer-appimage.sh @@ -47,7 +47,7 @@ function usage() { echo " -b " echo " -i " echo " -o " - exit 0 + exit 1 } ARGV_APPLICATION_NAME="" diff --git a/scripts/linux/installer-deb.sh b/scripts/linux/installer-deb.sh index 27512883..4c8712d3 100755 --- a/scripts/linux/installer-deb.sh +++ b/scripts/linux/installer-deb.sh @@ -43,7 +43,7 @@ function usage() { echo " -r " echo " -c " echo " -o " - exit 0 + exit 1 } ARGV_DIRECTORY="" diff --git a/scripts/unix/create-asar.sh b/scripts/unix/create-asar.sh index 2a225c21..0635167e 100755 --- a/scripts/unix/create-asar.sh +++ b/scripts/unix/create-asar.sh @@ -35,7 +35,7 @@ function usage() { echo "" echo " -d " echo " -o " - exit 0 + exit 1 } ARGV_DIRECTORY="" diff --git a/scripts/unix/create-electron-app.sh b/scripts/unix/create-electron-app.sh index eaeed0c3..c2353a63 100755 --- a/scripts/unix/create-electron-app.sh +++ b/scripts/unix/create-electron-app.sh @@ -27,7 +27,7 @@ function usage() { echo " -s " echo " -f " echo " -o " - exit 0 + exit 1 } ARGV_SOURCE_DIRECTORY="" diff --git a/scripts/unix/dependencies-npm.sh b/scripts/unix/dependencies-npm.sh index 75b93d23..e3139934 100755 --- a/scripts/unix/dependencies-npm.sh +++ b/scripts/unix/dependencies-npm.sh @@ -40,7 +40,7 @@ function usage() { echo " -x " echo " -f force install" echo " -p production install" - exit 0 + exit 1 } ARGV_ARCHITECTURE="" diff --git a/scripts/unix/download-electron.sh b/scripts/unix/download-electron.sh index baaa9016..8ffca4c4 100755 --- a/scripts/unix/download-electron.sh +++ b/scripts/unix/download-electron.sh @@ -38,7 +38,7 @@ function usage() { echo " -v " echo " -s " echo " -o " - exit 0 + exit 1 } ARGV_ARCHITECTURE="" diff --git a/scripts/unix/package-cli.sh b/scripts/unix/package-cli.sh index 9a168cde..d508e18b 100755 --- a/scripts/unix/package-cli.sh +++ b/scripts/unix/package-cli.sh @@ -40,7 +40,7 @@ function usage() { echo " -r " echo " -s " echo " -o " - exit 0 + exit 1 } ARGV_APPLICATION_NAME=""