diff options
author | Ac_K <Acoustik666@gmail.com> | 2023-06-28 19:09:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 19:09:48 +0200 |
commit | 16fa98370472f843ebdae5addbb00e26899ebe55 (patch) | |
tree | 499b972164e4fdacdccc25a0024e24f095f39b6a /distribution/macos/updater.sh | |
parent | 40daca5684afdc8a62dfcb1beb27c58b5262c9e7 (diff) |
macOS: Fix warning in some shell scripts (#5398)1.1.940
* 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
Diffstat (limited to 'distribution/macos/updater.sh')
-rwxr-xr-x | distribution/macos/updater.sh | 8 |
1 files changed, 4 insertions, 4 deletions
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 |