Skip to content

Document restrictions on start command's first parameter #482

@fbiville

Description

@fbiville

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions