lib/rconf/support/environment_updater.rb in rconf-0.9.18 vs lib/rconf/support/environment_updater.rb in rconf-0.9.19
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
+# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
#
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
# reproduction, modification, or disclosure of this program is
# strictly prohibited. Any use of this program by an authorized
@@ -52,10 +52,10 @@
candidates.map! { |c| File.join(ENV['HOME'], c) }
bashrc_path = candidates.detect { |c| File.exist?(c) }
updated = false
if bashrc_path
content = IO.read(bashrc_path)
- unless content.include?(code)
+ unless content.include?(code)
i = dependencies.inject(nil) do |m, d|
index = content.index(/^\s*#{d}=/)
m = if m.nil?
index
else