Skip to content

Commit

Permalink
Fix Docker WSL2 engine scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Jun 23, 2020
1 parent fde43b3 commit 2582661
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/code.sh
Expand Up @@ -7,7 +7,8 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
ROOT=$(dirname "$(dirname "$(realpath "$0")")")
else
ROOT=$(dirname "$(dirname "$(readlink -f $0)")")
if grep -qi Microsoft /proc/version; then
# If the script is running in Docker using the WSL2 engine, powershell.exe won't exist
if grep -qi Microsoft /proc/version && type powershell.exe > /dev/null 2>&1; then
IN_WSL=true
fi
fi
Expand Down

0 comments on commit 2582661

Please sign in to comment.