github-action
github-action copied to clipboard
Document restrictions on start command's first parameter
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.
Can confirm this is also an issue with the build: argument.