繁体   English   中英

在 GitHub 操作的 NPM 脚本中将文本文件作为 CLI 参数传递

[英]Pass text file as CLI argument in NPM script in GitHub action

我在 npm 脚本中有很长的 cmd 命令,我尝试将其中的一部分提取到文本文件中,然后将其内容作为 arguments 传递。

"build": "npm-run-all --print-label $(< build-order.txt)",

它在本地工作,但是当我在 GitHub 操作上运行此命令时,什么也没有发生在此处输入图像描述 没有错误,什么都没有。

我使用https://github.com/marketplace/actions/debugging-with-tmate尝试在终端中运行此命令,当我只执行pnpm npm-run-all --print-label $(< build-order.txt)它正在工作,但是当再次pnpm build时什么也没有发生。 在 github 操作上运行 npm 脚本本身感觉有点不对劲。

看起来 GitHub 操作存在一些问题,这有助于

"build": "npm-run-all --print-label $(cat build-order.txt)",

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM