• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision7ae3cf11fb60653f4d3b35cc621de7760e0be251 (tree)
l'heure2016-03-15 20:49:35
AuteurTatsuki Sugiura <sugi@nemu...>
CommiterTatsuki Sugiura

Message de Log

Stop to launch web brwoser on non-x11 env.

Change Summary

Modification

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
11 2016-03-15 Tatsuki Sugiura <sugi@nemui.org>
22
3+ * Version 0.0.4
4+ * login: stop to launch web browser on non-X11 environment.
5+
6+2016-03-15 Tatsuki Sugiura <sugi@nemui.org>
7+
8+ * Version 0.0.3
39 * frs_upload: show upload progres in verbose mode.
410 * frs_upload: validates file digest after upload.
511
--- a/lib/osdn/cli/command/login.rb
+++ b/lib/osdn/cli/command/login.rb
@@ -31,12 +31,14 @@ module OSDN; module CLI; module Command
3131
3232 def launch_brwoser(url)
3333 puts "Access follwoing URL to get auth code;\n#{url}"
34- %w(/usr/bin/xdg-open /usr/bin/X11/xdg-open /usr/local/bin/xdg-open
35- /usr/bin/x-www-browser /usr/bin/firefox /usr/local/bin/firefox
36- ).each do |bin|
37- File.executable?(bin) or next
38- exec(bin, url) if fork.nil?
39- return
34+ if ENV['DISPLAY']
35+ %w(/usr/bin/xdg-open /usr/bin/X11/xdg-open /usr/local/bin/xdg-open
36+ /usr/bin/x-www-browser /usr/bin/firefox /usr/local/bin/firefox
37+ ).each do |bin|
38+ File.executable?(bin) or next
39+ exec(bin, url) if fork.nil?
40+ return
41+ end
4042 end
4143 case RUBY_PLATFORM
4244 when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
--- a/lib/osdn/cli/version.rb
+++ b/lib/osdn/cli/version.rb
@@ -1,5 +1,5 @@
11 module OSDN
22 module CLI
3- VERSION = "0.0.3"
3+ VERSION = "0.0.4"
44 end
55 end