mirror of
https://git.proxmox.com/git/pve-common
synced 2025-04-29 07:09:36 +00:00
pbs client: use spaces around list braces and parens around ternaries
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
This commit is contained in:
parent
bd8408bcec
commit
b79643cb45
@ -213,7 +213,7 @@ my sub run_client_cmd : prototype($$;$$$$) {
|
|||||||
$param = [] if !defined($param);
|
$param = [] if !defined($param);
|
||||||
$param = [ $param ] if !ref($param);
|
$param = [ $param ] if !ref($param);
|
||||||
|
|
||||||
$param = [@$param, '--output-format=json'] if !$no_output;
|
$param = [ @$param, '--output-format=json' ] if !$no_output;
|
||||||
|
|
||||||
do_raw_client_cmd(
|
do_raw_client_cmd(
|
||||||
$self,
|
$self,
|
||||||
@ -236,7 +236,7 @@ sub autogen_encryption_key {
|
|||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
my $encfile = $self->encryption_key_file_name();
|
my $encfile = $self->encryption_key_file_name();
|
||||||
run_command(
|
run_command(
|
||||||
['proxmox-backup-client', 'key', 'create', '--kdf', 'none', $encfile],
|
[ 'proxmox-backup-client', 'key', 'create', '--kdf', 'none', $encfile ],
|
||||||
errmsg => 'failed to create encryption key'
|
errmsg => 'failed to create encryption key'
|
||||||
);
|
);
|
||||||
return file_get_contents($encfile);
|
return file_get_contents($encfile);
|
||||||
@ -324,7 +324,7 @@ sub forget_snapshot {
|
|||||||
|
|
||||||
(my $namespace, $snapshot) = split_namespaced_parameter($self, $snapshot);
|
(my $namespace, $snapshot) = split_namespaced_parameter($self, $snapshot);
|
||||||
|
|
||||||
return run_client_cmd($self, 'forget', ["$snapshot"], 1, undef, $namespace)
|
return run_client_cmd($self, 'forget', [ "$snapshot" ], 1, undef, $namespace)
|
||||||
};
|
};
|
||||||
|
|
||||||
sub prune_group {
|
sub prune_group {
|
||||||
@ -380,7 +380,7 @@ sub file_restore_list {
|
|||||||
my ($self, $snapshot, $filepath, $base64, $extra_params) = @_;
|
my ($self, $snapshot, $filepath, $base64, $extra_params) = @_;
|
||||||
|
|
||||||
(my $namespace, $snapshot) = split_namespaced_parameter($self, $snapshot);
|
(my $namespace, $snapshot) = split_namespaced_parameter($self, $snapshot);
|
||||||
my $cmd = [ $snapshot, $filepath, "--base64", $base64 ? 1 : 0];
|
my $cmd = [ $snapshot, $filepath, "--base64", ($base64 ? 1 : 0) ];
|
||||||
|
|
||||||
if (my $timeout = $extra_params->{timeout}) {
|
if (my $timeout = $extra_params->{timeout}) {
|
||||||
push($cmd->@*, '--timeout', $timeout);
|
push($cmd->@*, '--timeout', $timeout);
|
||||||
@ -432,7 +432,7 @@ sub file_restore_extract {
|
|||||||
my $fn = fileno($fh);
|
my $fn = fileno($fh);
|
||||||
my $errfunc = sub { print $_[0], "\n"; };
|
my $errfunc = sub { print $_[0], "\n"; };
|
||||||
|
|
||||||
my $cmd = [ $snapshot, $filepath, "-", "--base64", $base64 ? 1 : 0];
|
my $cmd = [ $snapshot, $filepath, "-", "--base64", ($base64 ? 1 : 0) ];
|
||||||
if ($tar) {
|
if ($tar) {
|
||||||
push(@$cmd, '--format', 'tar', '--zstd', 1);
|
push(@$cmd, '--format', 'tar', '--zstd', 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user