【发布时间】:2022-08-24 02:19:56
【问题描述】:
我正在尝试将两个 shell 命令与concurrently lib 结合起来,并且应该有将用户输入转发到其中一个子进程的选项,请参阅docs here,--handle-input 部分。但它在我的情况下不起作用:
npm 脚本
\"test:unit\": \"concurrently --kill-others --handle-input --names test,build \\\"vitest --environment jsdom\\\" \\\"vite build --watch\\\"\",
结果是
[test] Tests 1 failed | 12 passed (13)
[test] Time 94ms
[test]
[test]
[test] FAIL Tests failed. Watching for file changes...
[test] press u to update snapshot, press h to show help
当我单独运行它时,我正在按“u”,但没有任何反应,即使我试图通过输入键确认。
所以也许我对 lib 的理解有误,或者其他什么。如何将我的击键传递给子进程“测试”?
谢谢你的任何建议。
-
我发现github.com/open-cli-tools/concurrently/issues/… 可能是由于“原始标准输入”导致的更好的