I just upgraded to the new cap2 beta gem (posted here on June 25,
2007), and I'm noticing something very weird when passing in command-
line variables to /usr/bin/cap.

Relevant portions of deploy.rb:
-------------------
role :master, "[EMAIL PROTECTED]"

namespace :master do
  task :test_cap, :roles => [:master] do
    puts "You passed in #{arg1}"
  end
end


When I run cap master:test_cap -s arg1="hello", the method executes
just fine. However, after the test_cap task finishes, it spits an
error out:

  * executing `master:test_cap'
You passed in hello
invalid option: -s
Test::Unit automatic runner.
Usage: /usr/bin/cap [options] [-- untouched arguments]

    -r, --runner=RUNNER              Use the given RUNNER.
                                     (c[onsole], f[ox], g[tk], g[tk]2,
t[k])
    -n, --name=NAME                  Runs tests matching NAME.
                                     (patterns may be used).
    -t, --testcase=TESTCASE          Runs tests in TestCases matching
TESTCASE.
                                     (patterns may be used).
    -v, --verbose=[LEVEL]            Set the output level (default is
verbose).
                                     (s[ilent], p[rogress], n[ormal],
v[erbose])
        --                           Stop processing options so that
the
                                     remaining options will be passed
to the
                                     test.
    -h, --help                       Display this help.

Deprecated options:
        --console                    Console runner (use --runner).
        --gtk                        GTK runner (use --runner).
        --fox                        Fox runner (use --runner).

Something in the options parsing to /usr/bin/cap must have changed.
The other option is that my /usr/bin/cap got symlinked to something
weird when I installed the latest gem. Does this output look correct
for /usr/bin/cap?:

[EMAIL PROTECTED] ~/redclay $ cat `which cap`
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'capistrano' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'
version = "> 0"
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
  version = $1
  ARGV.shift
end
gem 'capistrano', version
load 'cap'


Anyways, can someone see if they can reproduce the error I'm getting
with the latest Cap2 beta gem?

Thanks,
David Balatero


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to