Skip to content

Commit b6095e9

Browse files
committed
Fix opening files with spaces via CLI on Linux
Fixes microsoft#6525
1 parent 91cea4f commit b6095e9

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

resources/linux/bin/code.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
55

6-
ARGS=$@
7-
86
# If root, ensure that --user-data-dir is specified
97
if [ "$(id -u)" = "0" ]; then
108
while test $# -gt 0
@@ -35,5 +33,5 @@ fi
3533

3634
ELECTRON="$VSCODE_PATH/@@NAME@@"
3735
CLI="$VSCODE_PATH/resources/app/out/cli.js"
38-
ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 "$ELECTRON" "$CLI" $ARGS
36+
ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
3937
exit $?

scripts/code-cli.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ function code() {
3131
VSCODE_DEV=1 \
3232
ELECTRON_ENABLE_LOGGING=1 \
3333
ELECTRON_ENABLE_STACK_DUMPING=1 \
34-
"$ELECTRON" "$CLI" . $@
34+
echo $@
35+
"$ELECTRON" "$CLI" . "$@"
3536
}
3637

3738
code "$@"

0 commit comments

Comments
 (0)