mirror of
https://codeberg.org/puppe/mpbackup.git
synced 2025-12-19 21:42:17 +01:00
Respect --prune also if --config-name is missing
This commit is contained in:
parent
8831c2b403
commit
9fe11e852e
1 changed files with 5 additions and 1 deletions
6
mpbackup
6
mpbackup
|
|
@ -137,7 +137,11 @@ config_names = options[:config_names]
|
|||
if config_names.empty?
|
||||
puts "No configuration name has been given. Will use the first "\
|
||||
"configuration from the file (‘#{configs.dig(0, 'name')}’)."
|
||||
backup configs[0]
|
||||
if options[:prune]
|
||||
prune configs[0]
|
||||
else
|
||||
backup configs[0]
|
||||
end
|
||||
else
|
||||
config_hash = configs.map {|c| [c['name'], c]}.to_h
|
||||
config_names.each do |name|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue