Compare commits
5 Commits
76e047bbb2
...
2bf085bed6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bf085bed6 | ||
| 1bebd375e2 | |||
|
|
0f8875e063 | ||
|
|
7ff96b80f2 | ||
| 853fe6b0a7 |
@ -558,7 +558,7 @@ func (v *Vaultik) PurgeSnapshots(keepLatest bool, olderThan string, force bool)
|
||||
if !force {
|
||||
v.printfStdout("\nDelete %d snapshot(s)? [y/N] ", len(toDelete))
|
||||
var confirm string
|
||||
if _, err := v.scanStdin(&confirm); err != nil {
|
||||
if _, err := fmt.Scanln(&confirm); err != nil {
|
||||
// Treat EOF or error as "no"
|
||||
v.printlnStdout("Cancelled")
|
||||
return nil
|
||||
|
||||
@ -129,7 +129,7 @@ func (v *Vaultik) GetFilesystem() afero.Fs {
|
||||
return v.Fs
|
||||
}
|
||||
|
||||
// printfStdout writes formatted output to stdout.
|
||||
// printfStdout writes formatted output to stdout for user-facing messages.
|
||||
func (v *Vaultik) printfStdout(format string, args ...any) {
|
||||
_, _ = fmt.Fprintf(v.Stdout, format, args...)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user