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

Multiline value for install parameter. #90

Closed
reznikmm opened this issue Nov 18, 2020 · 6 comments
Closed

Multiline value for install parameter. #90

reznikmm opened this issue Nov 18, 2020 · 6 comments

Comments

@reznikmm
Copy link

It would be nice to specify install with multi-line value, like this:

  - uses: msys2/setup-msys2@v2
      install: |
        mingw64/mingw-w64-x86_64-gtk3
        mingw64/mingw-w64-x86_64-gprbuild
        mingw64/mingw-w64-x86_64-gcc-ada
        mingw64/mingw-w64-x86_64-pkg-config
        msys/make

But in this case I get error:

  C:\windows\system32\cmd.exe /D /S /C D:\a\_temp\msys\msys2.cmd -c "'pacman' '--noconfirm' '-S' '--needed' '--overwrite' '*' 'mingw64/mingw-w64-x86_64-gtk3
  mingw64/mingw-w64-x86_64-gprbuild
  mingw64/mingw-w64-x86_64-gcc-ada
  mingw64/mingw-w64-x86_64-pkg-config
  msys/make'"
  /usr/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
@1480c1
Copy link

1480c1 commented Nov 18, 2020

I think you might need to try something like

  - uses: msys2/setup-msys2@v2
      install: |
        mingw64/mingw-w64-x86_64-gtk3 ^
        mingw64/mingw-w64-x86_64-gprbuild ^
        mingw64/mingw-w64-x86_64-gcc-ada ^
        mingw64/mingw-w64-x86_64-pkg-config ^
        msys/make

@reznikmm
Copy link
Author

@1480c1 Thank you, but it doesn't work 😞

C:\windows\system32\cmd.exe /D /S /C D:\a\_temp\msys\msys2.cmd -c "'pacman' '--noconfirm' '-S' '--needed' '--overwrite' '*' 'mingw64/mingw-w64-x86_64-gtk3' '^
  mingw64/mingw-w64-x86_64-gprbuild' '^
  mingw64/mingw-w64-x86_64-gcc-ada' '^
  mingw64/mingw-w64-x86_64-pkg-config' '^
  msys/make'"
  /usr/bin/bash: -c: line 0: unexpected EOF while looking for matching `''

@lazka
Copy link
Member

lazka commented Nov 18, 2020

This works:

  - uses: msys2/setup-msys2@v2
      install: >-
        mingw64/mingw-w64-x86_64-gtk3
        mingw64/mingw-w64-x86_64-gprbuild
        mingw64/mingw-w64-x86_64-gcc-ada
        mingw64/mingw-w64-x86_64-pkg-config
        msys/make

But this yaml feature isn't that widely known, so we should probably use it in the README everywhere.

lazka added a commit that referenced this issue Nov 18, 2020
It's usually nicer to spread the install list over multiple lines and the yaml feature for doing so isn't that widely known, so just use it in all the examples.

See #90
@lazka
Copy link
Member

lazka commented Nov 18, 2020

See 812fce4

@reznikmm
Copy link
Author

This works! Thank you! 🎆

@eine
Copy link
Collaborator

eine commented Nov 18, 2020

Indeed... I saw @lazka use it somewhere and I really liked it. I believe that > alone works too. So:

  • | include newlines.
  • > strip newlines.

Ref: https://yaml-multiline.info/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants