From 5ba53d2a926bc49dd0be7f280af8ec1dea3fdcf9 Mon Sep 17 00:00:00 2001 From: img2tab <31696646+img2tab@users.noreply.github.com> Date: Sun, 7 Apr 2019 20:04:28 +0000 Subject: [PATCH] ${microsoft_path} comments --- macos-guest-virtualbox.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macos-guest-virtualbox.sh b/macos-guest-virtualbox.sh index f3234a0..3c7eba2 100644 --- a/macos-guest-virtualbox.sh +++ b/macos-guest-virtualbox.sh @@ -108,9 +108,9 @@ if [ -z "$(VBoxManage -v 2>/dev/null)" ]; then fi # Windows Subsystem for Linux (WSL) -microsoft_path="" # if the Windows home directory path contains spaces, please assign a rw-able path without spaces +microsoft_path="" # if the path contains spaces, please assign a read-write-able path without spaces if [[ -z "${microsoft_path}" && "$(cat /proc/sys/kernel/osrelease 2>/dev/null)" == *"Microsoft"* ]]; then - microsoft_path="$(cmd.exe /C cd)" # returns Windows user's home directory + microsoft_path="$(cmd.exe /C cd)" # returns working directory in Microsoft-style (backslash) path microsoft_path="${microsoft_path:0:-1}"'\' # remove trailing newline \M if [[ "${microsoft_path,,}" =~ .*sytem32.* ]]; then echo "Please run this script without elevated privileges.\n"; exit; fi if [[ ${microsoft_path} == *" "* || ${vmname} == *" "* ]]; then