Document restrictions on start command's first parameter

未关闭
#482 1 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
45/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
停滞
技术栈
github-actions, typescript
领域
documentation

调研方向

从 start 输入的 action 文档开始,检查 packages/io/src/io.ts 中链接的 @actions/io 源代码,尤其是 io.ts 在第 257-260 行附近的检查。记录第一个 start 参数不能是相对可执行文件路径,并加入 issue 中展示的基于 shell 的变通方案。

由索引模型根据 Issue 内容生成。

描述

documentation

I just spent hours scratching my head trying to understand why my server would not start and always get the error:

Unable to locate executable file: [...]

The file is actually there and is executable.

      - uses: cypress-io/github-action@v2
        env:
          [...]
          DEBUG: '@cypress/github-action'
        with:
          [...]
          path: e2e
          start: ../some/executable/script

It turns out io.which from @actions/io, called by this GitHub action, refuses to parse executable paths from relative script files. I assume this is for security reasons (actual source):

  if (tool.includes(path.sep)) {
    return []
  }

I believe the documentation of start should clearly state that scripts cannot be executed like this.

As a workaround, I ran:

      - uses: cypress-io/github-action@v2
        env:
          [...]
          DEBUG: '@cypress/github-action'
        with:
          [...]
          path: e2e
          start: sh ../some/executable/script

and it works just fine.

主要语言
JavaScript
星标
1.5k
派生
356
平均合并
1 天 9 小时
30 天内合并 PR
28

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cypress-io/github-action 的其他 Issue

查看 cypress-io/github-action 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。