don't load password when autocompleting CLI commands

This commit is contained in:
Michael Eischer committed 2023-10-23 21:44:22 +02:00
1 parent d6917c7e00
commit cd09ef4614
2 files changed
+9 -1

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
Bugfix: Do not try to load password on command line autocomplete
The command line autocompletion previously tried to load the repository
password. This could cause the autocompletion not to work. Now, this step gets
skipped.
https://github.com/restic/restic/issues/4516
https://github.com/restic/restic/pull/4526
+1 -1
View File
@@ -80,7 +80,7 @@ The full documentation can be found at https://restic.readthedocs.io/ .
// user for authentication).
func needsPassword(cmd string) bool {
switch cmd {
case "cache", "generate", "help", "options", "self-update", "version":
case "cache", "generate", "help", "options", "self-update", "version", "__complete":
return false
default:
return true