Skip to content

Commit

Permalink
Warn about installing VS Code in WSL
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli authored and alexdima committed Apr 11, 2019
1 parent 86fee5f commit d4fba1f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions resources/linux/bin/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

# test that VSCode wasn't installed inside WSL
if grep -qi Microsoft /proc/version; then
echo "To use VS Code with the Windows Subsystem for Linux, please install VS Code in Windows and uninstall the Linux version in WSL. You can then use the '@@PRODNAME@@' command in a WSL terminal just as you would in a normal command prompt." 1>&2
read -e -p "Do you want to continue anyways ? [y/N] " YN

[[ $YN == "n" || $YN == "N" || $YN == "" ]] && exit 1
fi


# If root, ensure that --user-data-dir or --file-write is specified
if [ "$(id -u)" = "0" ]; then
for i in $@
Expand Down

0 comments on commit d4fba1f

Please sign in to comment.