1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-26 09:47:49 +00:00

Merge pull request #1662 from ebastos/version_password

Skip checking for password file issue #1632
This commit is contained in:
Alexander Neumann 2018-03-09 20:42:32 +01:00
commit 7f8e269891

View file

@ -29,14 +29,16 @@ directories in an encrypted repository stored on different backends.
SilenceUsage: true,
DisableAutoGenTag: true,
PersistentPreRunE: func(*cobra.Command, []string) error {
PersistentPreRunE: func(c *cobra.Command, args []string) error {
// parse extended options
opts, err := options.Parse(globalOptions.Options)
if err != nil {
return err
}
globalOptions.extended = opts
if c.Name() == "version" {
return nil
}
pwd, err := resolvePassword(globalOptions, "RESTIC_PASSWORD")
if err != nil {
fmt.Fprintf(os.Stderr, "Resolving password failed: %v\n", err)