github - github 操作上的 Glob 降价文件仅返回 `docs` 文件夹
问题描述
我的项目中有多个包含降价文件的文件夹。我想cspell
针对他们运行(和其他工具)。不幸的是,docs
blob 中只返回了子文件夹中的降价文件。
这是一个动作文件的片段:
- name: 'Spellchecking Content'
run: |
npm install cspell -g
pwd
ls ./**/*.md
npx cspell $(ls ./**/*.md) -c ${{ github.workspace }}/cspell.json
working-directory: ${{ github.workspace }}
同样,问题在于ls ./**/*.md
GitHub 中的操作仅返回文件docs
夹中的 markdown 文件,而没有返回其他子文件夹中的 markdown 文件。
故障排除:
pwd
打印项目工作区的正确主文件夹ls ./**/*.md
仅列出docs
子文件夹中的文件- 我试图
working-directory
明确设置 - 该命令适用于我的本地机器,但不适用于 GitHub
解决方案
所以,有趣的是,如果我更换
npx cspell $(ls ./**/*.md) -c ${{ github.workspace }}/cspell.json
和
npx cspell $(find . -name '*.md') -c ${{ github.workspace }}/cspell.json
有用。
这是 GitHub 操作中的错误还是记录在案的限制?
推荐阅读
- google-chrome - Puppeteer save file downloaded from background_page
- html - How to link viber user page in wordpress?
- c# - ASP.Net MVC - Entity Framework 6 有时会创建重复记录?
- c# - version.props 中的递增数字
- c++ - 使用 cmake 交叉编译 libwebsockets
- bi-publisher - BI Publisher 为 Word 添加
- netsuite - 用空格替换字母
- javascript - PHP 不返回 Ajax 调用
- java - 在 android 上运行时,java 中的简单类实例的内存成本如何?
- angular - 表单子组件的 Angular ngmodel 验证