-
-
Save zimmem/022a1aabe1853927c07e8c3a713faa5b to your computer and use it in GitHub Desktop.
vs code for cygwin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Copyright (c) Microsoft Corporation. All rights reserved. | |
# Licensed under the MIT License. See License.txt in the project root for license information. | |
case "`uname`" in | |
CYGWIN*) cygwin=true;; | |
esac | |
NAME="Code" | |
if $cygwin; then | |
VSCODE_PATH="$(dirname "$(dirname "$(realpath "$(cygpath -d "$0")")")")" | |
FILE=$(cygpath -d "$@") | |
else | |
VSCODE_PATH="$(dirname "$(dirname "$(realpath "$0")")")" | |
FILE=$@ | |
fi | |
ELECTRON="$VSCODE_PATH/$NAME.exe" | |
CLI="$VSCODE_PATH/resources/app/out/cli.js" | |
ELECTRON_NO_ATTACH_CONSOLE=1 ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$FILE" | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment