From 794e01ec6c0b370db51465495f0f226fcd08afea Mon Sep 17 00:00:00 2001 From: Aaron Klotz Date: Fri, 8 Aug 2025 15:26:21 -0600 Subject: [PATCH] make gocross-wrapper.sh nicer to cygwin and mingw users Signed-off-by: Aaron Klotz --- tool/gocross/gocross-wrapper.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tool/gocross/gocross-wrapper.sh b/tool/gocross/gocross-wrapper.sh index 22130a049..d93b137aa 100755 --- a/tool/gocross/gocross-wrapper.sh +++ b/tool/gocross/gocross-wrapper.sh @@ -16,8 +16,9 @@ if [[ "${CI:-}" == "true" && "${NOBASHDEBUG:-}" != "true" ]]; then fi if [[ "${OSTYPE:-}" == "cygwin" || "${OSTYPE:-}" == "msys" ]]; then - echo "You're running on Windows: use go.cmd instead." >&2 - exit 1 + hash pwsh 2>/dev/null || { echo >&2 "This operation requires PowerShell Core."; exit 1; } + pwsh -NoProfile -ExecutionPolicy Bypass "${BASH_SOURCE%/*}/gocross-wrapper.ps1" "$@" + exit fi # Locate a bootstrap toolchain and (re)build gocross if necessary. We run all of