mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-01-03 13:44:27 +01:00
Fixed trying to read wsl.conf when it's missing
This commit is contained in:
parent
a0b62f5717
commit
c6c4bc078a
@ -185,11 +185,13 @@ fi
|
|||||||
if [ -n "$UBUNTU_ON_WINDOWS" ]; then
|
if [ -n "$UBUNTU_ON_WINDOWS" ]; then
|
||||||
WSL_ROOT="/mnt/"
|
WSL_ROOT="/mnt/"
|
||||||
CFG_FILE=/etc/wsl.conf
|
CFG_FILE=/etc/wsl.conf
|
||||||
CFG_CONTENT=$(cat $CFG_FILE | sed -r '/[^=]+=[^=]+/!d' | sed -r 's/\s+=\s/=/g')
|
if [ -f CFG_FILE ]; then
|
||||||
eval "$CFG_CONTENT"
|
CFG_CONTENT=$(cat $CFG_FILE | sed -r '/[^=]+=[^=]+/!d' | sed -r 's/\s+=\s/=/g')
|
||||||
if [ -n "$root" ]; then
|
eval "$CFG_CONTENT"
|
||||||
WSL_ROOT=$root
|
if [ -n "$root" ]; then
|
||||||
fi
|
WSL_ROOT=$root
|
||||||
|
fi
|
||||||
|
fi
|
||||||
HOST_PWD=`pwd -P`
|
HOST_PWD=`pwd -P`
|
||||||
HOST_PWD=${HOST_PWD/$WSL_ROOT//}
|
HOST_PWD=${HOST_PWD/$WSL_ROOT//}
|
||||||
elif [ -n "$MSYS" ]; then
|
elif [ -n "$MSYS" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user