mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Attempt to map /mnt/ paths for WSL on Windows
This commit is contained in:
@@ -4,9 +4,15 @@ if command -v "cygpath" > /dev/null; then
|
||||
# We have cygpath to do the conversion
|
||||
ATOMCMD=$(cygpath "$(dirname "$0")/atom.cmd" -a -w)
|
||||
else
|
||||
# We don't have cygpath so try pwd -W
|
||||
pushd "$(dirname "$0")" > /dev/null
|
||||
ATOMCMD="$(pwd -W)/atom.cmd"
|
||||
if [ "grep -q Microsoft /proc/sys/kernel/osrelease" ]; then
|
||||
# We are in Windows Subsystem for Linux, map /mnt/drive
|
||||
ATOMCMD="$(echo $PWD | sed 's/\/mnt\/\([a-z]*\)\(.*\)/\1:\2/')/atom.cmd"
|
||||
ATOMCMD="${ATOMCMD////\\}"
|
||||
else
|
||||
# We don't have cygpath or WSL so try pwd -W
|
||||
ATOMCMD="$(pwd -W)/atom.cmd"
|
||||
fi
|
||||
popd > /dev/null
|
||||
fi
|
||||
if [ "$(uname -o)" == "Msys" ]; then
|
||||
|
||||
Reference in New Issue
Block a user