Skip to content

Instantly share code, notes, and snippets.

@vivien
Created August 11, 2011 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vivien/1141090 to your computer and use it in GitHub Desktop.
Save vivien/1141090 to your computer and use it in GitHub Desktop.
Passing arguments from one rake task to another
task :first, :arg1, :arg2 do |t, args|
puts "first"
Rake::Task[:second].invoke(args.arg1, args.arg2)
end
task :second, :arg1, :arg2 do |t, args|
puts "second"
puts args.arg1
puts args.arg2
end
__END__
$ rake first[one,two]
first
second
one
two
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment