mirror of
https://github.com/atom/atom.git
synced 2026-01-26 15:28:27 -05:00
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:
4
resources/win/atom.sh
Normal file → Executable file
4
resources/win/atom.sh
Normal file → Executable 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
|
||||
|
||||
Reference in New Issue
Block a user