mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
code server scripts: use realpath
This commit is contained in:
@@ -329,7 +329,7 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
.pipe(rename(`bin/helpers/browser.sh`))
|
||||
.pipe(util.setExecutableBit()),
|
||||
gulp.src('resources/server/bin/code-server.sh', { base: '.' })
|
||||
gulp.src(`resources/server/bin/${platform === 'darwin' ? 'code-server-darwin.sh' : 'code-server-linux.sh'}`, { base: '.' })
|
||||
.pipe(rename(`bin/${product.serverApplicationName}`))
|
||||
.pipe(util.setExecutableBit())
|
||||
);
|
||||
|
||||
13
resources/server/bin/code-server-darwin.sh
Normal file
13
resources/server/bin/code-server-darwin.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
--inspect*) INSPECT="$1"; shift;;
|
||||
esac
|
||||
|
||||
function realpath() { python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; }
|
||||
ROOT=$(dirname $(dirname $(realpath "$0")))
|
||||
|
||||
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" "$@"
|
||||
@@ -7,6 +7,6 @@ case "$1" in
|
||||
--inspect*) INSPECT="$1"; shift;;
|
||||
esac
|
||||
|
||||
ROOT=$(dirname "$(dirname "$0")")
|
||||
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
||||
|
||||
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" "$@"
|
||||
Reference in New Issue
Block a user