-
-
Save magicdawn/0ae28a7c79262861ddbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def alias_task(name, old_name) | |
t = Rake::Task[old_name] | |
desc t.full_comment if t.full_comment | |
task name, *t.arg_names do |_, args| | |
# values_at is broken on Rake::TaskArguments | |
args = t.arg_names.map { |a| args[a] } | |
t.invoke(args) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
*t.arg_names
do |_,args|