提交 13f70045 编写于 作者: J Joao Moreno

remove VSCODE_PATH from cli, move to linux

上级 ef931f2e
......@@ -271,7 +271,7 @@ function prepareDebPackage(arch) {
var packageRevision = '1';
return function () {
var shortcut = gulp.src('resources/common/bin/code.sh', { base: '.' })
var shortcut = gulp.src('resources/linux/bin/code.sh', { base: '.' })
.pipe(rename(function (p) { p.extname = ''; p.dirname = 'usr/bin'; }));
var desktop = gulp.src('resources/linux/debian/code.desktop', { base: '.' })
......
......@@ -5,16 +5,14 @@
VSCODE_DIR="/usr/share/code"
if [ -x "$VSCODE_DIR/Code" ]; then
ELECTRON_FILE="Code"
ELECTRON="$VSCODE_DIR/Code"
elif [ -x "$VSCODE_DIR/Code - OSS" ]; then
ELECTRON_FILE="Code - OSS"
ELECTRON="$VSCODE_DIR/Code - OSS"
else
echo "Could not locate Visual Studio Code executable."
exit 1
fi
VSCODE_LAUNCHER="$VSCODE_DIR/resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 VSCODE_PATH="$VSCODE_DIR/$ELECTRON_FILE" \
"$VSCODE_DIR/$ELECTRON_FILE" $VSCODE_LAUNCHER "$@"
CLI="$VSCODE_DIR/resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
exit $?
......@@ -46,7 +46,7 @@ export function main(argv: string[]) {
console.log(packageJson.version);
} else {
delete process.env['ELECTRON_RUN_AS_NODE'];
spawn(process.env['VSCODE_PATH'], process.argv.slice(2), { detached: true, stdio: 'ignore' });
spawn(process.execPath, process.argv.slice(2), { detached: true, stdio: 'ignore' });
}
process.exit(0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册