From 1e08570817d088e4bfccb14276ae94edfa47a599 Mon Sep 17 00:00:00 2001 From: lededev <30518126+lededev@users.noreply.github.com> Date: Tue, 14 Dec 2021 07:13:51 +0800 Subject: [PATCH] Add warning when build environment is WSL2 docker (#3341) * Add warning when build environment is WSL2 docker * change warning message for WSL2 Docker Co-authored-by: lededev --- lib/general.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/general.sh b/lib/general.sh index 52b222c7d6..e08f28e11d 100644 --- a/lib/general.sh +++ b/lib/general.sh @@ -1302,7 +1302,11 @@ prepare_host() fi if grep -qE "(Microsoft|WSL)" /proc/version; then - exit_with_error "Windows subsystem for Linux is not a supported build environment" + if [ -f /.dockerenv ]; then + display_alert "Building images using Docker on WSL2 may fail" "" "wrn" + else + exit_with_error "Windows subsystem for Linux is not a supported build environment" + fi fi # build aarch64