]> git.proxmox.com Git - pve-common.git/commit - src/PVE/JSONSchema.pm
get_options: don't set optional positional params to `undef`
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 16 Mar 2021 10:24:24 +0000 (11:24 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 16 Mar 2021 12:15:57 +0000 (13:15 +0100)
commit26764d7cc368ce793f713598fc55b3d26bddad01
tree43d57afe56dab092b61a0c23f6ef69e18bee5a22
parent30ca0de57a624d81c522a407c5519d1f113888c1
get_options: don't set optional positional params to `undef`

Currently this happened if (and only if) at least one
positional parameter was passed.

We run into this with
  `pmgconfig cert delete <type> [<restart>]`
vs
  `pvenode cert delete [<restart>]`

where in the PVE case the `restart` option was simply
omitted, whereas for PMG due to the existence of `<type>`
the `restart` option was explicitly passedset in the $opts
hash but ended up being `undef`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/PVE/JSONSchema.pm