Skip to content

Commit 0f3c772

Browse files
committed
Fix Windows smoke: convert MSYS2 POSIX paths for native binary
MSYS2 mktemp returns /tmp/tmp.XXX but the Windows binary can't resolve POSIX paths. Use cygpath -m to convert to C:/msys64/tmp/tmp.XXX which works in both MSYS2 shell and Windows file APIs.
1 parent dc919b2 commit 0f3c772

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/smoke-test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ set -euo pipefail
1111

1212
BINARY="${1:?usage: smoke-test.sh <binary-path>}"
1313
TMPDIR=$(mktemp -d)
14+
# On MSYS2/Windows, convert POSIX path to native Windows path for the binary
15+
if command -v cygpath &>/dev/null; then
16+
TMPDIR=$(cygpath -m "$TMPDIR")
17+
fi
1418
trap 'rm -rf "$TMPDIR"' EXIT
1519

1620
CLI_STDERR=$(mktemp)

0 commit comments

Comments
 (0)