summaryrefslogtreecommitdiff
path: root/net-misc/mikutter/files/mikutter-0.2.2.1537-disable-bundler.patch
blob: 582787dab70486b14b64dcc01a0d62d5135a87be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
commit d2d55a4c463c43de4577b479b7717f7648005e5c
Author: Toshiaki Asai <toshi.alternative@gmail.com>
Date:   Sat Mar 15 23:31:59 2014 +0900

    環境変数 DISABLE_BUNDLER_SETUP を空にセットすることで、bundlerを読みに行く挙動を抑制できるようにした refs #645

diff --git a/mikutter.rb b/mikutter.rb
index 3adcb90..695e2f5 100755
--- a/mikutter.rb
+++ b/mikutter.rb
@@ -13,12 +13,14 @@ You should have received a copy of the GNU General Public License along with thi
 =end
 mikutter_directory = File.expand_path(File.dirname(__FILE__))
 
-begin
-  ENV['BUNDLE_GEMFILE'] = File.expand_path(File.join(File.dirname($0), "Gemfile"))
-  require 'bundler/setup'
-rescue LoadError, SystemExit
-  # bundlerがないか、依存関係の解決に失敗した場合
-  # System の gem を使ってみる
+unless ENV['DISABLE_BUNDLER_SETUP']
+  begin
+    ENV['BUNDLE_GEMFILE'] = File.expand_path(File.join(File.dirname($0), "Gemfile"))
+    require 'bundler/setup'
+  rescue LoadError, SystemExit
+    # bundlerがないか、依存関係の解決に失敗した場合
+    # System の gem を使ってみる
+  end
 end
 
 Thread.abort_on_exception = true