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 the output of bundle check be un-hidden? #79

Closed
bewuethr opened this issue Mar 26, 2023 · 4 comments · Fixed by #90
Closed

Can the output of bundle check be un-hidden? #79

bewuethr opened this issue Mar 26, 2023 · 4 comments · Fixed by #90

Comments

@bewuethr
Copy link

I noticed a warning popping up in some of my builds recently:

Warning:  github-pages can't satisfy your Gemfile's dependencies.

Example: this workflow.

It seems that this is due to the change in #61, but I was a bit stumped which dependency this would be – my Gemfile is just this:

source "https://rubygems.org"

ruby "2.7.4"

gem "github-pages", "~> 228", group: :jekyll_plugins

As it turns out, the warning is due to a version mismatch in Gemfile.lock, but because the output is thrown away (>/dev/null 2>&1) here

if test -e "$SOURCE_DIRECTORY/Gemfile" && ! bundle check --dry-run --gemfile "$SOURCE_DIRECTORY/Gemfile" >/dev/null 2>&1; then

I had to figure out with trial and error.

Would it make sense to not hide that output, to make figuring this out a little easier? For what it's worth, my Gemfile.lock is the result of bundle install on that minimal Gemfile, and when I run bundle check with the Gemfile provided by this action with my Gemfile.lock in the container provided by this action, I get

$ bundle check --dry-run --gemfile Gemfile
Resolving dependencies...
The following gems are missing
 * nokogiri (1.14.1)
Install missing gems with `bundle install`

which I assume is because the Dockerfile uses

RUN NOKOGIRI_USE_SYSTEM_LIBRARIES=true bundle install

and having the action output include the missing gem would have made figuring this out way easier.

tl;dr, I suggest

@@ -14,7 +14,7 @@
 GITHUB_PAGES=$PAGES_GEM_HOME/bin/github-pages
 
 # Check if Gemfile's dependencies are satisfied or print a warning 
-if test -e "$SOURCE_DIRECTORY/Gemfile" && ! bundle check --dry-run --gemfile "$SOURCE_DIRECTORY/Gemfile" >/dev/null 2>&1; then
+if test -e "$SOURCE_DIRECTORY/Gemfile" && ! bundle check --dry-run --gemfile "$SOURCE_DIRECTORY/Gemfile"; then
   echo "::warning:: github-pages can't satisfy your Gemfile's dependencies."
 fi

because showing the output is helpful. Would such a PR be welcome?

@dijonkitchen
Copy link

Might be faster to make the PR than ask? I'd do it, but you deserve the git praise!

@emiliebarnard
Copy link

I am running into the same issue.

@bewuethr
Copy link
Author

Woohoo 🥳

@JamesMGreene
Copy link
Contributor

This is now released in v1.0.8 and the latest v1. 🚀

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

Successfully merging a pull request may close this issue.

4 participants