Merge pull request #17795 from Jinivus/master

Atom from WSL respects windows drive mount location defined in /etc/wsl.conf
This commit is contained in:
David Wilson
2018-08-28 13:33:08 -07:00
committed by GitHub

4
resources/win/atom.sh Normal file → Executable file
View File

@@ -7,6 +7,10 @@ else
pushd "$(dirname "$0")" > /dev/null
if [[ $(uname -r) == *-Microsoft ]]; then
# We are in Windows Subsystem for Linux, map /mnt/drive
root="/mnt/"
# If different root mount point defined in /etc/wsl.conf, use that instead
eval $(grep "^root" /etc/wsl.conf | sed -e "s/ //g")
root="$(echo $root | sed 's|/|\\/|g')"
ATOMCMD="$(echo $PWD | sed 's/\/mnt\/\([a-z]*\)\(.*\)/\1:\2/')/atom.cmd"
ATOMCMD="${ATOMCMD////\\}"
else