-
Notifications
You must be signed in to change notification settings - Fork 3
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
Calls from Hugo fail #1
Comments
Line 33 in 5369034
- ruby ${binary} ${options} "\$@"
+ ${binary} ${options} "\$@" Why do you run the binary via ruby? |
Bad naming on my part;
I found that out while writing the Windows wrapper (batch doesn't use shebangs, so I needed the extra call). For the bash wrapper, the error is the same with or without the explicit |
See my other approach. We probably do not need such a script to add the options. |
Aliases for sure wouldn't work from one action to the next step, would they? We could hack the I would much rather understand that weird error, and why it appears in one build but not the other. What's the difference between the wrapper written here and the old one that works? |
I do not figure out that different behavior, too. Anyway, this surely works well. Does not this satisfy your demand? Do you want to choose the approach of asciidoctor setup action? - name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- run: gem install asciidoctor
- run: |
alias asciidoctor="asciidoctor --attribute=experimental=true --attribute=icons=font"
hugo --minify
|
Oh, no. 🤦♂️ 🤣 return `
#!/bin/bash
foo
` Will create this: #!/bin/bash
foo Which does, indeed, not run: the shebang has to start at the first character of the file, it seems. Why it seems to work for the test in this repo, no idea. As far as I can tell, the test is effective and the script is actually used. But that latest commit fixed the issue downstream. 🤷 |
Hahaha, 🤣 I've faced the same problem ever, too. |
Good point. To reiterate:
With this action, the usage site is even longer than what you propose: - name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Setup asciidoctor
uses: reitzig/actions-asciidoctor@v1
with:
options: "-a experimental=true -a icons=font"
- name: Build
run: hugo --minify To be fair, this is mostly because actions can't call/depend on one another so everybody has to repeat So yes: Not a lot of value is added here at this point. Point taken. I'll chalk it down to a learning experience and see if maintaining it is more pain than just copy pasting that a little more hacky snippet of yours. 😅 Thanks for your work and time! 👋 |
Just my comment. Maybe, it is worth to suggest our feature request to |
Good point. Done, and tracked here under #4. |
When used in tandem with https://github.com/peaceiris/actions-hugo, calls to asciidoctor from Hugo fail:
Not sure what the qualitative difference to the old hack on that end is, though.
The text was updated successfully, but these errors were encountered: