.. in order to catch that error earlier, rather than having `proxmox-backup-client` err and complain that the "repository value doesn't match the regex pattern".
Signed-off-by: Max Carrara <m.carr...@proxmox.com> --- src/PVE/PBSClient.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm index 26f73ef..e7e9a79 100644 --- a/src/PVE/PBSClient.pm +++ b/src/PVE/PBSClient.pm @@ -108,6 +108,8 @@ sub get_repository { my $username = $scfg->{username} // 'root@pam'; + die "no realm given for username '$username'" if $username !~ m/@/; + return "$username\@$server:$datastore"; } -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel