fix: accountUnlock: add missing check_spurious_args and no_auto_abbrev

This commit is contained in:
Stéphane Lesimple 2022-07-18 16:36:23 +00:00 committed by Stéphane Lesimple
parent 81aeb2ee3c
commit 8c2b6a410a

View file

@ -7,7 +7,7 @@
#>HEADER #>HEADER
use common::sense; use common::sense;
use Getopt::Long; use Getopt::Long qw(:config no_auto_abbrev no_ignore_case);
use File::Basename; use File::Basename;
use lib dirname(__FILE__) . '/../../lib/perl'; use lib dirname(__FILE__) . '/../../lib/perl';
use OVH::Result; use OVH::Result;
@ -28,6 +28,9 @@ if (!$result) {
local $" = ", "; local $" = ", ";
HEXIT('ERR_BAD_OPTIONS', msg => "Error parsing options: @optwarns"); HEXIT('ERR_BAD_OPTIONS', msg => "Error parsing options: @optwarns");
} }
OVH::Bastion::Helper::check_spurious_args();
if (!$account) { if (!$account) {
HEXIT('ERR_MISSING_PARAMETER', msg => "Missing argument 'account'"); HEXIT('ERR_MISSING_PARAMETER', msg => "Missing argument 'account'");
} }