Skip to content

Commit

Permalink
Detect WSL and abandon install if detected
Browse files Browse the repository at this point in the history
  • Loading branch information
hsoerensen committed Mar 6, 2024
1 parent 30d2bba commit 7546b95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,11 @@ else
abort "This script is only meant to be run on Debian or Ubuntu."
fi

# Check if running on WSL 1 or WSL 2
if grep -qE "(Microsoft|WSL)" /proc/version &> /dev/null ; then
abort "WSL is not supported. Please run this script on a native Linux installation."
fi

if [[ ! (${operating_system_distribution} == "ubuntu" || ${operating_system_distribution} == "debian") ]]; then
echo "Detected operating system: ${operating_system_distribution}"
abort "This script is only meant to be run on Debian or Ubuntu."
Expand Down

0 comments on commit 7546b95

Please sign in to comment.