bug-1635734 Fixed config param handler

This commit is contained in:
Carlos Salguero
2016-10-27 12:20:40 -03:00
parent 51ded0e80a
commit c61ce0f3db

View File

@@ -615,6 +615,13 @@ sub get_opts {
$self->{errors} = [];
# --config is special-case; parse them manually and remove them from @ARGV
if ( @ARGV && $ARGV[0] =~/^--config=/ ) {
$ARGV[0] = substr($ARGV[0],9);
# Clean '" independently because we need to match start/end with the same char ' or "
$ARGV[0] =~ s/^'(.*)'$/$1/
$ARGV[0] =~ s/^"(.*)"$/$1/;
$self->_set_option('config', shift @ARGV);
}
if ( @ARGV && $ARGV[0] eq "--config" ) {
shift @ARGV;
$self->_set_option('config', shift @ARGV);