Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Aeschlimann <martinae@microsoft.com>2022-03-15 19:31:54 +0300
committerMartin Aeschlimann <martinae@microsoft.com>2022-03-15 19:31:58 +0300
commite971acd7370154a38a1a2de2584273af6bea16ab (patch)
tree1a8d4fd84cd6db0b09e8c748a2c90a7164790400 /scripts
parentc94e9da4c3cbf87411c89ff783f0526f2265152e (diff)
Code server provide a way to open a default-folder or default-workspace. Fixes #143580
Diffstat (limited to 'scripts')
-rw-r--r--scripts/code-server.bat9
-rwxr-xr-xscripts/code-server.sh6
2 files changed, 10 insertions, 5 deletions
diff --git a/scripts/code-server.bat b/scripts/code-server.bat
index bba4c58d3c1..23006f829ee 100644
--- a/scripts/code-server.bat
+++ b/scripts/code-server.bat
@@ -3,7 +3,9 @@ setlocal
title VSCode Server
-pushd %~dp0\..
+set ROOT_DIR=%~dp0..
+
+pushd %ROOT_DIR%
:: Configuration
set NODE_ENV=development
@@ -20,9 +22,10 @@ if not exist "%NODE%" (
call yarn gulp node
)
+popd
+
:: Launch Server
-call "%NODE%" scripts\code-server.js %*
+call "%NODE%" %ROOT_DIR%\scripts\code-server.js %*
-popd
endlocal
diff --git a/scripts/code-server.sh b/scripts/code-server.sh
index 298157e4ee7..bc910a9bb98 100755
--- a/scripts/code-server.sh
+++ b/scripts/code-server.sh
@@ -8,7 +8,7 @@ else
fi
function code() {
- cd $ROOT
+ pushd $ROOT
# Get electron, compile, built-in extensions
if [[ -z "${VSCODE_SKIP_PRELAUNCH}" ]]; then
@@ -21,9 +21,11 @@ function code() {
yarn gulp node
fi
+ popd
+
NODE_ENV=development \
VSCODE_DEV=1 \
- $NODE ./scripts/code-server.js "$@"
+ $NODE $ROOT/scripts/code-server.js "$@"
}
code "$@"