Try to use dotnet console class instead for stdin test

This commit is contained in:
Filip Tibell 2025-04-25 15:39:35 +02:00
parent c13728fce4
commit 27409f1bf4
No known key found for this signature in database

View file

@ -7,7 +7,7 @@ local expected = "Hello from child process!"
-- has unfortunately proved to be a significant challenge...
local options = { stdio = { stdin = expected } }
local result = if process.os == "windows"
then process.exec("powershell", { "-Command", "{ & bash -c cat }" }, options)
then process.exec("powershell", { "-Command", "[System.Console]::In.ReadToEnd()" }, options)
else process.exec("bash", { "-c", "cat" }, options)
local resultStdout = result.stdout