mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
Attempt to fix process exec test on windows
This commit is contained in:
parent
f6d2afb003
commit
5a23cf04fa
1 changed files with 1 additions and 3 deletions
|
@ -2,10 +2,8 @@ local process = require("@lune/process")
|
|||
|
||||
local expected = "Hello from child process!"
|
||||
|
||||
-- When passing stdin to powershell on windows we must "accept" using the double newline
|
||||
|
||||
local result = if process.os == "windows"
|
||||
then process.exec("powershell", { "echo" }, { stdio = { stdin = expected .. "\n\n" } })
|
||||
then process.exec("powershell", { "-Command", "$input" }, { stdio = { stdin = expected } })
|
||||
else process.exec("xargs", { "echo" }, { stdio = { stdin = expected } })
|
||||
|
||||
local resultStdout = result.stdout
|
||||
|
|
Loading…
Add table
Reference in a new issue