有没有办法从https://repo.packagist.org筛选出信息?
作曲家有时会或多或少地提供有用/相关/兴趣ig“ infor” https://repo.packagist.org :... ”。
有没有办法不显示此消息?
也许是通过自定义外壳命令将其路由并滤除某些字符串的方法?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简短的答案是
-Q
,- QUIES
命令行选项。它也抑制了其他输出。退出状态被保留。您尚未分享哪个外壳,但这肯定是可能的。在您的系统上给出
unnuffer(1)
和bash(1)
a as/bin/bash
,您可以拥有一个可执行文件命名COMPOSER
在PATH
的早期内,已安装的Copser(1)
在运行Composer(1) >
unnupler(1)
ed。由于这取决于您的外壳配置,因此可以更好地使用名为
install.sh
的文件来回答,该文件之后可以采购:要激活包装器,请源:
然后,您可以使用此减少噪声过滤器运行每个
COMPOSER ...
命令。实际包装器相对较薄(采购后输出您的
install.sh
以进行比较,因为路径不同):原则上,这与
Composer
本身独立,只有一个带有<<的输出过滤器代码> sed(1)并包装命令行实用程序。在CI中,您可能需要做不同的事情,例如隐藏所有输出直到发生错误。
慢性(1)
可以做到这一点。The short answer is the
-q
,--quiet
command-line option. It suppresses other output, too. Exit status is preserved.You have not shared which shell, but this is certainly possible. Given on your system there is
unbuffer(1)
andbash(1)
as/bin/bash
, you could have an executable namedcomposer
within earlier in thePATH
than the installedcomposer(1)
one that filters that line out while runningcomposer(1)
unbuffer(1)
ed.As this depends on your shell configuration it is perhaps better answered with a file named
install.sh
that can be sourced afterwards:To activate the wrapper, source the
install.sh
file:You can then run every
composer ...
command with this noise reduction filter.The actual wrapper is relatively thin (output yours after sourcing
install.sh
for comparison as paths differ):In principle this is independent to
composer
itself, just an output filter withsed(1)
and wrapping a command-line utility.Within CI you may want to do things differently, e.g. hiding all output until an error occurs.
chronic(1)
can do this.httpps://github.com/github.com/github.com/composer/composer/10808080808080880808080808080808080808080808080808080808080808080808080808080808080808080808080963,讨论收入3090963 :
Curtesy of https://github.com/composer/composer/discussions/10808#discussioncomment-3090963: