mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
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.
This commit is contained in:
parent
445b4bd453
commit
9a40a06a46
|
@ -1,4 +1,4 @@
|
|||
#!/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 "$@"
|
||||
|
|
Loading…
Reference in a new issue