From d5b370f1bcccfa16746db64874301c10e750418d Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 16 Apr 2006 06:29:44 +0000 Subject: [PATCH] Argument with -- alone specifies that the following arguments are not options --- maintenance/commandLine.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index b8188e6380..416a8877d8 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -39,7 +39,15 @@ $args = array(); # Parse arguments for( $arg = reset( $argv ); $arg !== false; $arg = next( $argv ) ) { - if ( substr( $arg, 0, 2 ) == '--' ) { + if ( $arg == '--' ) { + # End of options, remainder should be considered arguments + $arg = next( $argv ); + while( $arg !== false ) { + $args[] = $arg; + $arg = next( $argv ); + } + break; + } elseif ( substr( $arg, 0, 2 ) == '--' ) { # Long options $option = substr( $arg, 2 ); if ( in_array( $option, $optionsWithArgs ) ) { -- 2.20.1