2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-21 20:35:12 +00:00

Merge pull request #4524 from MichaelEischer/fix-autocompletion

Don't load password when autocompleting CLI commands
This commit is contained in:
Michael Eischer 2023-10-23 20:06:53 +00:00 committed by GitHub
commit ead8dd0173
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

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

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