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

Jim Weirich jweirich at one.net
Tue Jun 15 07:58:12 EDT 2004


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 they 
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)



More information about the Rake-devel mailing list