From 16fa98370472f843ebdae5addbb00e26899ebe55 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Wed, 28 Jun 2023 19:09:48 +0200 Subject: macOS: Fix warning in some shell scripts (#5398) * macOS: Fix warning in some shell scripts In a way to continue the cleaning of the project, there are some warnings which can be easily fixed. * Try to fix CI * Fix APP_ARGUMENTS * Addresses feedback --- distribution/macos/updater.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'distribution/macos/updater.sh') diff --git a/distribution/macos/updater.sh b/distribution/macos/updater.sh index 4d7dcdf2..12e4c3aa 100755 --- a/distribution/macos/updater.sh +++ b/distribution/macos/updater.sh @@ -5,7 +5,7 @@ set -e INSTALL_DIRECTORY=$1 NEW_APP_DIRECTORY=$2 APP_PID=$3 -APP_ARGUMENTS="${@:4}" +APP_ARGUMENTS=("${@:4}") error_handler() { local lineno="$1" @@ -33,7 +33,7 @@ trap 'error_handler ${LINENO}' ERR attempt=0 while true; do - if lsof -p $APP_PID +r 1 &>/dev/null || ps -p "$APP_PID" &>/dev/null; then + if lsof -p "$APP_PID" +r 1 &>/dev/null || ps -p "$APP_PID" &>/dev/null; then if [ "$attempt" -eq 4 ]; then exit 1 fi @@ -53,5 +53,5 @@ mv "$NEW_APP_DIRECTORY" "$INSTALL_DIRECTORY" if [ "$#" -le 3 ]; then open -a "$INSTALL_DIRECTORY" else - open -a "$INSTALL_DIRECTORY" --args "$APP_ARGUMENTS" -fi + open -a "$INSTALL_DIRECTORY" --args "${APP_ARGUMENTS[@]}" +fi \ No newline at end of file -- cgit v1.2.3