Skip to content

Commit

Permalink
getopt: skip arg if it's decimal (closes #2598)
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed Sep 15, 2018
1 parent 07a8a20 commit 5f0c8cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/getopt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function getopt($argv, $shortopts, $longopts) {
# don't try to parse array arguments
if($arg -is [array]) { $rem += ,$arg; continue }
if($arg -is [int]) { $rem += $arg; continue }
if($arg -is [decimal]) { $rem += $arg; continue }

if($arg.startswith('--')) {
$name = $arg.substring(2)
Expand Down

0 comments on commit 5f0c8cf

Please sign in to comment.