Commit 6a93686f authored by Clément OUDOT's avatar Clément OUDOT

Possibility to force version with CLI (#1360)

parent 59cb7077
......@@ -199,7 +199,12 @@ sub _save {
unless ( $parser->testNewConf() ) {
printf STDERR "Modifications rejected: %s:\n", $parser->{message};
}
my $s = $self->mgr->confAcc->saveConf( $new, { force => $self->force } );
my $saveParams = { force => $self->force };
if ( $self->force and $self->cfgNum ) {
$saveParams->{cfgNum} = $self->cfgNum;
$saveParams->{cfgNumFixed} = 1;
}
my $s = $self->mgr->confAcc->saveConf( $new, %$saveParams );
if ( $s > 0 ) {
print STDERR "Saved under number $s\n";
$parser->{status} = [ $self->mgr->applyConf($new) ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment