github-action icon indicating copy to clipboard operation
github-action copied to clipboard

Document restrictions on start command's first parameter

Open fbiville opened this issue 4 years ago • 1 comments

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.

fbiville avatar Jan 14 '22 17:01 fbiville

Can confirm this is also an issue with the build: argument.

jakemwood avatar Nov 15 '22 02:11 jakemwood