Skip to content

Commit a0c5048

Browse files
committed
Add support for "--" script parameters in the Carton wrapper
1 parent 82c014a commit a0c5048

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Carton/CLI/MediaWords.pm

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use warnings;
55
use Carton::Environment;
66
use parent( 'Carton::CLI' );
77

8+
our $UseSystem = 0; # 1 for unit testing
9+
810
sub cmd_exec
911
{
1012
my ( $self, @args ) = @_;
@@ -30,9 +32,8 @@ sub cmd_exec
3032
}
3133
}
3234

33-
my $system; # for unit testing
3435
my @include;
35-
$self->parse_options( \@args, 'I=s@', \@include, "system", \$system );
36+
$self->parse_options_pass_through( \@args ); # to handle --
3637

3738
unless ( @args )
3839
{
@@ -50,7 +51,7 @@ sub cmd_exec
5051
local $ENV{ PERL5OPT } = "-Mlib::core::only -Mlib=$lib $carton_extra_perl5opt";
5152
local $ENV{ PATH } = "$path/bin:$ENV{PATH}";
5253

53-
$system ? system( @args ) : exec( @args );
54+
$UseSystem ? system( @args ) : exec( @args );
5455
}
5556

5657
1;

0 commit comments

Comments
 (0)