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 <lededev@noreplay.github.com>
This commit is contained in:
lededev 2021-12-14 07:13:51 +08:00 committed by GitHub
parent 4c913692af
commit 1e08570817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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