mirror of
https://github.com/restic/restic.git
synced 2025-12-15 03:53:20 +00:00
Remove Exitf function
Commands should use the normal shutdown path. In addition, the Exitf function was only used by `dump` and `restore` but not any other command which introduces the risk of inconsistent behavior.
This commit is contained in:
@@ -281,17 +281,6 @@ func Warnf(format string, args ...interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
// Exitf uses Warnf to write the message and then terminates the process with
|
||||
// the given exit code.
|
||||
func Exitf(exitcode int, format string, args ...interface{}) {
|
||||
if !(strings.HasSuffix(format, "\n")) {
|
||||
format += "\n"
|
||||
}
|
||||
|
||||
Warnf(format, args...)
|
||||
Exit(exitcode)
|
||||
}
|
||||
|
||||
// resolvePassword determines the password to be used for opening the repository.
|
||||
func resolvePassword(opts GlobalOptions, envStr string) (string, error) {
|
||||
if opts.PasswordFile != "" && opts.PasswordCommand != "" {
|
||||
|
||||
Reference in New Issue
Block a user