Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't execute multiline commands #272

Open
phanan opened this issue Jan 4, 2021 · 2 comments
Open

Can't execute multiline commands #272

phanan opened this issue Jan 4, 2021 · 2 comments
Labels
type: enhancement New feature or request

Comments

@phanan
Copy link

phanan commented Jan 4, 2021

With GitHub actions, one can execute multiple commands with this multiline syntax:

run: |
  command1 --option1
  command2 --option2

Such behavior, however, doesn't seem to be respected by Cypress GH action. For instance, if I have this setup:

- uses: cypress-io/github-action@v2
  with:
    build: |
      command1 --option1
      command2 --option2

The actual command executed will be a combined, invalid, command1 --option1 command2 --option2.

@wmadden
Copy link

wmadden commented Jan 13, 2021

I ran into a similar problem with the build parameter.

It's caused by the execCommand() function here. I don't understand why but the Cypress action doesn't just pass the string as-is to the shell, it parses the build string using argument-vector (which basically just splits it on whitespace), checks that the first segment of the string (in your example command) resolves to a known binary on the $PATH using which and then glues the string components back together (which is why your command ends up as one long string).

In my case my build failed using build: ./bin/build because which ./bin/build fails 🙄

@bahmutov
Copy link
Contributor

bahmutov commented Feb 4, 2021

I would be open to a pull request implementing this

@jennifer-shehane jennifer-shehane added the type: enhancement New feature or request label Feb 5, 2021
dricholm added a commit to dricholm/guess-the-hero that referenced this issue Nov 13, 2022
- Add exitOnceUploaded for Chromatic.
- Add e2e build script for Cypress' build parsing:
  cypress-io/github-action#272
dricholm added a commit to dricholm/guess-the-hero that referenced this issue Nov 13, 2022
* Update to Next.js 13

- Update all dependencies to latest version.

* Update images to use new Image component

* Refactor to Next.js 13 app directory

* Add react-query

* Move API logic to src

* Add VSCode workspace settings

* Update play page

- Hero to guess is the one with the highest net worth.
- Show 10 heroes from the match instead of every hero.

* Update CI workflow

- Add exitOnceUploaded for Chromatic.
- Add e2e build script for Cypress' build parsing:
  cypress-io/github-action#272

* Add basic 404 page

* Clean up Match component

- Remove console.log.
- Remove unnecessary div.
- Add no-console ESLint rule.

* Add unit test for Loading

- Remove unused utils file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants