18F / jekyll_pages_api_search

DEPRECATED - Jekyll search plugin based on lunr.js and jekyll_pages_api
https://rubygems.org/gems/jekyll_pages_api_search
Other
39 stars 8 forks source link

`program_exists?` in Rakefile was returning bad results #11

Closed catherinedevlin closed 8 years ago

catherinedevlin commented 8 years ago

Redirecting stderr was returning false results.

$ which which
/usr/bin/which
$ irb
irb(main):001:0> def program_exists?(program)
irb(main):002:1>   system '/usr/bin/which', program, [:out,:err]=>'/dev/null'
irb(main):003:1> end
=> :program_exists?
irb(main):004:0> def program_exists_no_redirect?(program)
irb(main):005:1>   system '/usr/bin/which', program
irb(main):006:1> end
=> :program_exists_no_redirect?
irb(main):007:0> program_exists? "which"
=> false
irb(main):008:0> program_exists_no_redirect? "which"
/usr/bin/which
=> true
mbland commented 8 years ago

Whoa, the change looks good, but the build error looks transient. Wanna kick off a rebuild, @catherinedevlin?

mbland commented 8 years ago

I went ahead and kicked off a rebuild. The PR version passes because #12 updated the tests to use the Liquid tag API included in the latest version of Jekyll (3.1.1). The push version fails because it's based on a commit branch that doesn't yet have the fix.

So odd that the redirect issue is happening. See also 18F/go_script#13 (which you merged for me, @catherinedevlin). Merging this now, but would love to hear how you were hitting this case.

Additional things: