Bitbucket 管道在排除隐藏目录中的 grep 命令时失败

问题描述 投票:0回答:1

我要运行以下命令:

grep -r -n --exclude-dir='.test' ERROR . >> errors.txt

这在终端上运行良好,但是当我通过 yml 文件在 bitbucket 管道上运行它时,它失败并出现错误:

grep: unrecognized option: exclude-dir=.test

有人可以帮忙找出正确的语法吗?
谢谢

我已经尝试过了

grep -r -n --exclude-dir='.test' ERROR . >> errors.txt

grep -r -n --exclude-dir=.test ERROR . >> errors.txt

Docker:高山安卓 github.com/alvr/alpine-android

terminal grep yaml bitbucket-pipelines hidden-files
1个回答
0
投票

Alpine 图像对常用 shell 工具具有不同的实现。它们中的大多数不接受长(双破折号)选项,并且其中一些仅具有非 alpine Linux 发行版中附带的常规工具所接受的所有选项的子集。

除非您使用具有严重硬件磁盘限制的管道运行程序,否则我建议您在步骤中避免使用高山风格的图像

© www.soinside.com 2019 - 2024. All rights reserved.