你想请求一个_feature_还是报告一个_bug_?
漏洞
当前的行为是什么?
当运行yarn licenses generateDisclaimer
并将标准输出传输到文件时,我希望只获得免责声明文本,以便轻松将此功能与 CI 等集成。相反,前几行如下所示:
yarn licenses v0.15.1
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE XXX PRODUCT.
第三行是正确的,但两个程序与免责声明无关。
在文件的末尾,有一行说
Done in 5.45s.
这也不是免责声明的一部分,也不应该是输出的一部分。
我看到了四种可能的解决方案。
yarn
的元数据发送到stderr
generateDisclaimer
-q, --quiet
标志generateDisclaimer
中添加-o --output
选项如果当前行为是错误,请提供重现的步骤。
yarn licenses generateDisclaimer > DISCLAIMERS.txt
DISCLAIMERS.txt
预期的行为是什么?
免责声明文件的生成没有THE FOLLOWING SETS FORTH ATTRIBUTION
前面的部分,并且末尾没有Done in 5.45s.
。
请提及您的 node.js、yarn 和操作系统版本。
$ yarn --version
0.15.1
$ node --version
v6.4.0
$ uname -a
Linux thor.osl.manamind.com 4.7.7-200.fc24.x86_64 #1 SMP Sat Oct 8 00:21:59 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
我想开始做出贡献,所以我将致力于此。
创建#1586 来解决这个问题,等待批准。
大家好,我似乎仍然有这个问题:
$ yarn --version
0.22.0
$ yarn licenses generate-disclaimer > test.out
warning [email protected]: No license field
warning [email protected]: The platform "darwin" is incompatible with this module.
warning [email protected]: The platform "darwin" is incompatible with this module.
warning package.json: No license field
$ head test.out
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE CASTBRIDGE PRODUCT.
...
有没有什么办法解决这一问题? 谢谢!
NINJA 编辑:我可以运行yarn licenses generate-disclaimer --ignore-platform
,这确实可以满足我的要求,但我认为这不是预期的使用模式。 (我可能是错的)
最有用的评论
大家好,我似乎仍然有这个问题:
有没有什么办法解决这一问题? 谢谢!
NINJA 编辑:我可以运行
yarn licenses generate-disclaimer --ignore-platform
,这确实可以满足我的要求,但我认为这不是预期的使用模式。 (我可能是错的)