@@ -469,8 +469,6 @@ func promptForCommand(command string, cfg *config.ResolvedConfig) (map[string][]
}
}
--
// includeFlags lists the restic flags that provide explicit file
// selection for restore. When any of these are already present in the
// resolved config, the interactive file picker is skipped — the user
@@ -84,10 +84,10 @@ const CommandSuffix = "_COMMAND"
// check for it themselves.
func (rc *ResolvedConfig) HasEnvSource(key string) bool {
if rc.Environ != nil {
- if _, ok := rc.Environ[key]; ok {
+ if v, ok := rc.Environ[key]; ok && v != "" {
return true
}
- if _, ok := rc.Environ[key+CommandSuffix]; ok {
+ if v, ok := rc.Environ[key+CommandSuffix]; ok && v != "" {
return true
}
}