diff options
| author | h2so5 <[email protected]> | 2013-04-24 12:21:27 +0900 |
|---|---|---|
| committer | h2so5 <[email protected]> | 2013-04-24 12:21:27 +0900 |
| commit | 713615e948106682598c1d83f42b1a4e4ccce891 (patch) | |
| tree | f7337ed3c8134dcf82fd171e344edf1041b2bcf3 | |
| parent | 3465bff916e5a416e268d19d0f690892ac1357b0 (diff) | |
| download | mruby-713615e948106682598c1d83f42b1a4e4ccce891.tar.gz mruby-713615e948106682598c1d83f42b1a4e4ccce891.zip | |
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 |
