From c13728fce4ed9e1ec51c658a73590523406af53b Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Fri, 25 Apr 2025 15:02:12 +0200 Subject: [PATCH] Okay lets try poweshell again --- tests/process/exec/stdin.luau | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/process/exec/stdin.luau b/tests/process/exec/stdin.luau index 3ef8b78..09efa37 100644 --- a/tests/process/exec/stdin.luau +++ b/tests/process/exec/stdin.luau @@ -5,7 +5,10 @@ local expected = "Hello from child process!" -- NOTE: This requires "bash" to be installed even for Windows -- users, testing a simple cat from stdin to stdout using pwsh -- has unfortunately proved to be a significant challenge... -local result = process.exec("bash", { "-c", "cat" }, { stdio = { stdin = expected } }) +local options = { stdio = { stdin = expected } } +local result = if process.os == "windows" + then process.exec("powershell", { "-Command", "{ & bash -c cat }" }, options) + else process.exec("bash", { "-c", "cat" }, options) local resultStdout = result.stdout resultStdout = string.gsub(resultStdout, "^%s+", "") -- Trim leading whitespace