# $is_cargo==0 <build-command>...
OPTS: for (;;) {
- @ARGV or die "$self: need cargo subcommand\n";
+ if (!@ARGV) {
+ die "$self: need cargo subcommand\n" unless $noact;
+ push @ARGV, "CARGO-SUBCOMMAND"; # dummy, user may see it
+ }
$_ = shift @ARGV;
my $orgopt = $_;
$not_a_nailing_opt->() if $_ eq '--';
if ($_ eq '---') { # usage 2 or 3
- die "$self: --- must be followed by build command\n" unless @ARGV;
+ if (!@ARGV) {
+ die "$self: --- must be followed by build command\n" unless $noact;
+ push @ARGV, 'BUILD-COMMAND';
+ }
if ($ARGV[0] eq '--') { # usage 3
shift;
$is_cargo = 0;