From: Jim Weirich Date: 2007-01-16T12:07:58+09:00 Subject: Re: Q: How can a Rake task know the caller's directory? James Britt wrote: > Trans wrote: >>> $ r com This is my log message >> >> how are you accessing "This is my log message" in your task? > > ARGV.shift # remove the task name > ARGV.join( ' ') # Get everything else on the command line > > Sadly, rake still thinks that there are more tasks on the command line; > even calling ARGV.clear doesn't help. > > (I looked for the command to flush the Rake task call queue, but > couldn't find it, so I live with the error it raises at the end. :( ) You could do: rake com MSG="This is my log message" Inside of your Rakefile, ENV['MSG'] will contain your log message. Sadly, more typing that what you have, but it works with rake instead of against it. -- Jim Weirich -- Posted via http://www.ruby-forum.com/.