1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

fs: add names to each config parameter so we can override them #3455

This commit is contained in:
Nick Craig-Wood
2021-05-04 12:27:50 +01:00
parent 94dbfa4ea6
commit f122808d86
10 changed files with 96 additions and 66 deletions

View File

@@ -87,17 +87,17 @@ func init() {
if opt.RefreshToken == "" {
return fs.ConfigGoto("username")
}
return fs.ConfigConfirm("refresh", true, "Already have a token - refresh?")
return fs.ConfigConfirm("refresh", true, "config_refresh", "Already have a token - refresh?")
case "refresh":
if config.Result == "false" {
return nil, nil
}
return fs.ConfigGoto("username")
case "username":
return fs.ConfigInput("password", "username (email address)")
return fs.ConfigInput("password", "config_username", "username (email address)")
case "password":
m.Set("username", config.Result)
return fs.ConfigPassword("auth", "Your Sugarsync password.\n\nOnly required during setup and will not be stored.")
return fs.ConfigPassword("auth", "config_password", "Your Sugarsync password.\n\nOnly required during setup and will not be stored.")
case "auth":
username, _ := m.Get("username")
m.Set("username", "")