[Rake-devel] Suggestion: allow passing of extra command-lineargs to the task

Bennett, Patrick Patrick.Bennett at inin.com
Tue Jun 15 08:41:30 EDT 2004

Hmmm, I think the environment is crowded enough already.
Perhaps a global Rake::ARGS hash would be more appropriate?
I definitely agree that the arguments need to be available at the global
level within rakefile's, and not just withih task bodies.  Conditionals
are frequently needed in advanced rakefile's, and the user needs some
clean way of controlling those through the command-line.

> -----Original Message-----
> From: rake-devel-bounces at rubyforge.org [mailto:rake-devel-
> bounces at rubyforge.org] On Behalf Of Jim Weirich
> Sent: Tuesday, June 15, 2004 6:58 AM
> To: rake-devel
> Subject: Re: [Rake-devel] Suggestion: allow passing of extra command-
> lineargs to the task
> Gavin Sinclair wrote:
>  > Sometimes I want a Rake task to be able to accept command-line
>  > arguments.  E.g., I'm generatin an HTML document from a Textile
>  > input, but I might want to vary the input file on occasion.
> The current rake CVS tree supports arguments of the form NAME=VALUE on
> the command line.  The values are put into the ENV hash (just as if
> had been defined in the environment).  Currently, the enhanced ENV is
> only available in the task bodies, not at the top level (I intend to
> eventually remove that limitation).
> --
> -- Jim Weirich    jim at weirichhouse.org     http://onestepback.org
> -----------------------------------------------------------------
> "Beware of bugs in the above code; I have only proved it correct,
> not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
> _______________________________________________
> Rake-devel mailing list
> Rake-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rake-devel

More information about the Rake-devel mailing list