From 1068aeb3988b7ef080bd812bb1fa330c27e1b9f7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 2 Sep 2015 12:09:54 +0200 Subject: [PATCH 1/1] remove + from getopt's prefix_pattern Perl by default interprets + as a parameter prefix, which means commands like `pct resize 103 rootfs +1G` error with 'Unknown option: 1g', we don't want that. --- src/PVE/JSONSchema.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index ed1813d..47aa278 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -1082,6 +1082,8 @@ sub get_options { } } + Getopt::Long::Configure('prefix_pattern=(--|-)'); + my $opts = {}; raise("unable to parse option\n", code => HTTP_BAD_REQUEST) if !Getopt::Long::GetOptionsFromArray($args, $opts, @getopt); -- 2.39.2