提交 9a40a06a 编写于 作者: J James Ko

Forward arguments correctly: use "$@" instead of $*

Also added an exec to improve performance (which replaces the current process instead of spawning a subshell),
and changed the shebang to #!/usr/bin/env as this is best practice.
上级 445b4bd4
#!/bin/bash
#!/usr/bin/env bash
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
......@@ -27,10 +27,10 @@ function code() {
# Launch Code
if [[ "$OSTYPE" == "darwin"* ]]; then
./.build/electron/Electron.app/Contents/MacOS/Electron . $*
exec ./.build/electron/Electron.app/Contents/MacOS/Electron . "$@"
else
./.build/electron/electron . $*
exec ./.build/electron/electron . "$@"
fi
}
code $*
code "$@"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册