Skip to content

Commit

Permalink
scylla_setup: fix conditional statement of silent mode
Browse files Browse the repository at this point in the history
Commit 300af65 introdued a problem in
conditional statement, script will always abort in silent mode, it doesn't
care about the return value.

Fixes #3485

Signed-off-by: Amos Kong <amos@scylladb.com>
Message-Id: <1c12ab04651352964a176368f8ee28f19ae43c68.1528077114.git.amos@scylladb.com>
(cherry picked from commit 364c255)
  • Loading branch information
amoskong authored and avikivity committed Jul 25, 2018
1 parent a02a459 commit 4b24439
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions dist/common/scripts/scylla_setup
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,15 @@ run_setup_script() {
name=$1
shift 1
$* &&:
if [ $? -ne 0 ] && [ $INTERACTIVE -eq 1 ]; then
printf "${RED}$name setup failed. press any key to continue...${NO_COLOR}\n"
read
return 1
else
printf "$name setup failed.\n"
exit 1
if [ $? -ne 0 ]; then
if [ $INTERACTIVE -eq 1 ]; then
printf "${RED}$name setup failed. press any key to continue...${NO_COLOR}\n"
read
return 1
else
printf "$name setup failed.\n"
exit 1
fi
fi
return 0
}
Expand Down

0 comments on commit 4b24439

Please sign in to comment.