Skip to content

Commit

Permalink
Task args no longer pick up values from the shell environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Feb 5, 2010
1 parent 60ad5d9 commit 5148aac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions lib/rake/task_arguments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ def inspect
def lookup(name)
if @hash.has_key?(name)
@hash[name]
elsif ENV.has_key?(name.to_s)
ENV[name.to_s]
elsif ENV.has_key?(name.to_s.upcase)
ENV[name.to_s.upcase]
elsif @parent
@parent.lookup(name)
end
Expand Down
6 changes: 3 additions & 3 deletions test/lib/task_arguments_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def test_extra_names_are_nil
assert_nil ta.cc
end

def test_args_can_reference_env_values
def test_args_do_not_reference_env_values
ta = Rake::TaskArguments.new(["aa"], [1])
ENV['rev'] = "1.2"
ENV['VER'] = "2.3"
assert_equal "1.2", ta.rev
assert_equal "2.3", ta.ver
assert_nil ta.rev
assert_nil ta.ver
end

def test_creating_new_argument_scopes
Expand Down

0 comments on commit 5148aac

Please sign in to comment.