From f739f36efdafa5394f733ce90dd5a9ad36301901 Mon Sep 17 00:00:00 2001 From: Sai Date: Wed, 7 Oct 2020 18:42:59 +0100 Subject: [PATCH 1/2] Fix WSL uname test On WSL2, Ubuntu 20.04.1, `uname -r` == `4.19.128-microsoft-standard`, so it won't match `/Microsoft$/` because both wrong case and non-final. I've changed it to use a simple regex. --- resources/win/atom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/win/atom.sh b/resources/win/atom.sh index 42840a938..9e1bc9914 100755 --- a/resources/win/atom.sh +++ b/resources/win/atom.sh @@ -5,7 +5,7 @@ if command -v "cygpath" > /dev/null; then ATOMCMD=$(cygpath "$(dirname "$0")/atom.cmd" -a -w) else pushd "$(dirname "$0")" > /dev/null - if [[ $(uname -r) == *-Microsoft ]]; then + if [[ $(uname -r) =~ "(M|m)icrosoft" ]]; 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 From 1601f9d70805932a4cc6fff4c75702589c01cfad Mon Sep 17 00:00:00 2001 From: Sai Date: Wed, 14 Oct 2020 11:07:46 +0100 Subject: [PATCH 2/2] Update resources/win/atom.sh Co-authored-by: Amin Yahyaabadi --- resources/win/atom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/win/atom.sh b/resources/win/atom.sh index 9e1bc9914..6f2a81cea 100755 --- a/resources/win/atom.sh +++ b/resources/win/atom.sh @@ -5,7 +5,7 @@ if command -v "cygpath" > /dev/null; then ATOMCMD=$(cygpath "$(dirname "$0")/atom.cmd" -a -w) else pushd "$(dirname "$0")" > /dev/null - if [[ $(uname -r) =~ "(M|m)icrosoft" ]]; then + if [[ $(uname -r) =~ (M|m)icrosoft ]]; 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