diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-24 07:42:43 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-24 07:42:43 -0700 |
| commit | 3083322088bfd486d11dbe1434b60294e7737372 (patch) | |
| tree | d87a14e08e99b484e3163d7884a111b7823c222b | |
| parent | 25c1ba3e35281373adf6ee902d5fe924adb245a0 (diff) | |
| parent | 713615e948106682598c1d83f42b1a4e4ccce891 (diff) | |
| download | mruby-3083322088bfd486d11dbe1434b60294e7737372.tar.gz mruby-3083322088bfd486d11dbe1434b60294e7737372.zip | |
Merge pull request #1207 from h2so5/set-env-before-loading-rakefile
Set ENV before loading Rakefile in minirake
| -rwxr-xr-x | minirake | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -435,20 +435,20 @@ class RakeApp end here = Dir.pwd end + tasks = [] + ARGV.each do |task_name| + if /^(\w+)=(.*)/.match(task_name) + ENV[$1] = $2 + else + tasks << task_name + end + end puts "(in #{Dir.pwd})" $rakefile = @rakefile load @rakefile if $show_tasks display_tasks else - tasks = [] - ARGV.each do |task_name| - if /^(\w+)=(.*)/.match(task_name) - ENV[$1] = $2 - else - tasks << task_name - end - end tasks.push("default") if tasks.size == 0 tasks.each do |task_name| MiniRake::Task[task_name].invoke |
