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

Do not raise exception of no launching program is found #42

Closed
copiousfreetime opened this issue Feb 1, 2012 · 0 comments
Closed

Do not raise exception of no launching program is found #42

copiousfreetime opened this issue Feb 1, 2012 · 0 comments
Assignees
Labels

Comments

@copiousfreetime
Copy link
Owner

From @mfn comment on #29

While testing out https://github.com/gitlabhq/gitlabhq I came across this issue while playing around with it; this problem has nothing to do with gitlabhq, it's just that with latest launch due their Gemlock I can see this:

gitlab@vserv03:~/gitlabhq$ bundle exec launchy http://slashdot.org/
sh: xprop: not found
/home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:41:in `shell_commands': undefined method `shellsplit' for nil:NilClass (NoMethodError)
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:104:in `block in wet_run'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:103:in `fork'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:103:in `wet_run'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/runner.rb:61:in `run'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/application.rb:58:in `run'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/applications/browser.rb:76:in `open'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy.rb:30:in `open'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/cli.rb:72:in `good_run'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/cli.rb:80:in `run'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/bin/launchy:4:in `<top (required)>'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/bin/launchy:19:in `load'
        from /home/gitlab/gitlabhq/vendor/bundle/ruby/1.9.1/bin/launchy:19:in `<main>'

It does not actually exhibit a real problem, it's just during e.g. loading the initial database there's seems to be something done using launchy which spams the screen full. After some searching I figured out it relates to launchy and did this simply test case.

I don't have cucumber installed, but I can give you the ruby output:

gitlab@vserv03:~/gitlabhq$ bundle exec ruby -rrbconfig -e "puts ::RbConfig::CONFIG['host_os']"
linux-gnu

This is a headless server so naturally there is no window manager installed thus no Xcfe and no xprop:

gitlab@vserv03:~/gitlabhq$ grep -r xprop *
vendor/bundle/ruby/1.9.1/gems/launchy-2.0.5/lib/launchy/detect/nix_desktop_environment.rb:        %x[ xprop -root _DT_SAVE_MODE | grep ' = \"xfce\"$' ].strip.size > 0

hth

@ghost ghost assigned copiousfreetime Feb 1, 2012
copiousfreetime added a commit that referenced this issue Mar 18, 2012
* do not blow up with a stack trace if xprop is not found
* output how to debug and file a bug report when a command is not found

Fixes Issue #42
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Mar 20, 2012
= Launchy Changlog
== Version 2.1.0 - 2012-03-18

* Fix raising exception when no browser program found
  (copiousfreetime/launchy#42)
* Add LAUNCHY_DRY_RUN environment variable (thanks Mariusz Pietrzyk / wijet)
* Update dependencies
jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this issue Dec 9, 2013
= Launchy Changlog
== Version 2.1.0 - 2012-03-18

* Fix raising exception when no browser program found
  (copiousfreetime/launchy#42)
* Add LAUNCHY_DRY_RUN environment variable (thanks Mariusz Pietrzyk / wijet)
* Update dependencies
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 11, 2014
= Launchy Changlog
== Version 2.1.0 - 2012-03-18

* Fix raising exception when no browser program found
  (copiousfreetime/launchy#42)
* Add LAUNCHY_DRY_RUN environment variable (thanks Mariusz Pietrzyk / wijet)
* Update dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant