Merge pull request #1214 from mquirin/test

Fixes for #1212:

    Changes phrasing of the confirmation prompt when removing a wg config (from "[Y/n]" to "[y/N]")
    Prints to stdout that operation is aborted
    Returns exit code 1
This commit is contained in:
4s3ti 2020-12-28 10:16:18 +01:00 committed by GitHub
commit d1f8c631fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,7 +80,7 @@ for CLIENT_NAME in "${CLIENTS_TO_REMOVE[@]}"; do
if [ -n "$CONFIRM" ]; then if [ -n "$CONFIRM" ]; then
REPLY="y" REPLY="y"
else else
read -r -p "Do you really want to delete $CLIENT_NAME? [Y/n] " read -r -p "Do you really want to delete $CLIENT_NAME? [y/N] "
fi fi
if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ $REPLY =~ ^[Yy]$ ]]; then
@ -129,6 +129,9 @@ for CLIENT_NAME in "${CLIENTS_TO_REMOVE[@]}"; do
fi fi
fi fi
else
echo "Aborting operation"
exit 1
fi fi
fi fi