瀏覽代碼

macos: Fix relaunch with updater when no arguments were provided to the emulator (#4987)

The updater still seems to be erroring when replacing installed folder under normal operations.
Mary 3 年之前
父節點
當前提交
f8cdd5f484
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      distribution/macos/updater.sh

+ 6 - 1
distribution/macos/updater.sh

@@ -36,4 +36,9 @@ sleep 1
 # Now replace and reopen.
 rm -rf "$INSTALL_DIRECTORY"
 mv "$NEW_APP_DIRECTORY" "$INSTALL_DIRECTORY"
-open -a "$INSTALL_DIRECTORY" --args "$APP_ARGUMENTS"
+
+if [ "$#" -le 3 ]; then
+    open -a "$INSTALL_DIRECTORY"
+else
+    open -a "$INSTALL_DIRECTORY" --args "$APP_ARGUMENTS"
+fi