mirror of
https://github.com/rclone/rclone.git
synced 2025-03-04 10:22:08 +01:00
parent
5c3a1bbf30
commit
6494ac037f
@ -303,6 +303,9 @@ func doConfig(name string, in rc.Params, do func(config.UpdateRemoteOpt) (*fs.Co
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if updateRemoteOpt.NoOutput {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if !(updateRemoteOpt.NonInteractive || updateRemoteOpt.Continue) {
|
if !(updateRemoteOpt.NonInteractive || updateRemoteOpt.Continue) {
|
||||||
config.ShowRemote(name)
|
config.ShowRemote(name)
|
||||||
} else {
|
} else {
|
||||||
@ -323,6 +326,7 @@ func init() {
|
|||||||
for _, cmdFlags := range []*pflag.FlagSet{configCreateCommand.Flags(), configUpdateCommand.Flags()} {
|
for _, cmdFlags := range []*pflag.FlagSet{configCreateCommand.Flags(), configUpdateCommand.Flags()} {
|
||||||
flags.BoolVarP(cmdFlags, &updateRemoteOpt.Obscure, "obscure", "", false, "Force any passwords to be obscured", "Config")
|
flags.BoolVarP(cmdFlags, &updateRemoteOpt.Obscure, "obscure", "", false, "Force any passwords to be obscured", "Config")
|
||||||
flags.BoolVarP(cmdFlags, &updateRemoteOpt.NoObscure, "no-obscure", "", false, "Force any passwords not to be obscured", "Config")
|
flags.BoolVarP(cmdFlags, &updateRemoteOpt.NoObscure, "no-obscure", "", false, "Force any passwords not to be obscured", "Config")
|
||||||
|
flags.BoolVarP(cmdFlags, &updateRemoteOpt.NoOutput, "no-output", "", false, "Don't provide any output", "Config")
|
||||||
flags.BoolVarP(cmdFlags, &updateRemoteOpt.NonInteractive, "non-interactive", "", false, "Don't interact with user and return questions", "Config")
|
flags.BoolVarP(cmdFlags, &updateRemoteOpt.NonInteractive, "non-interactive", "", false, "Don't interact with user and return questions", "Config")
|
||||||
flags.BoolVarP(cmdFlags, &updateRemoteOpt.Continue, "continue", "", false, "Continue the configuration process with an answer", "Config")
|
flags.BoolVarP(cmdFlags, &updateRemoteOpt.Continue, "continue", "", false, "Continue the configuration process with an answer", "Config")
|
||||||
flags.BoolVarP(cmdFlags, &updateRemoteOpt.All, "all", "", false, "Ask the full set of config questions", "Config")
|
flags.BoolVarP(cmdFlags, &updateRemoteOpt.All, "all", "", false, "Ask the full set of config questions", "Config")
|
||||||
|
@ -514,6 +514,8 @@ type UpdateRemoteOpt struct {
|
|||||||
Obscure bool `json:"obscure"`
|
Obscure bool `json:"obscure"`
|
||||||
// Treat all passwords as obscured
|
// Treat all passwords as obscured
|
||||||
NoObscure bool `json:"noObscure"`
|
NoObscure bool `json:"noObscure"`
|
||||||
|
// Don't provide any output
|
||||||
|
NoOutput bool `json:"noOutput"`
|
||||||
// Don't interact with the user - return questions
|
// Don't interact with the user - return questions
|
||||||
NonInteractive bool `json:"nonInteractive"`
|
NonInteractive bool `json:"nonInteractive"`
|
||||||
// If set then supply state and result parameters to continue the process
|
// If set then supply state and result parameters to continue the process
|
||||||
|
@ -120,6 +120,7 @@ func init() {
|
|||||||
extraHelp += `- opt - a dictionary of options to control the configuration
|
extraHelp += `- opt - a dictionary of options to control the configuration
|
||||||
- obscure - declare passwords are plain and need obscuring
|
- obscure - declare passwords are plain and need obscuring
|
||||||
- noObscure - declare passwords are already obscured and don't need obscuring
|
- noObscure - declare passwords are already obscured and don't need obscuring
|
||||||
|
- noOutput - don't print anything to stdout
|
||||||
- nonInteractive - don't interact with a user, return questions
|
- nonInteractive - don't interact with a user, return questions
|
||||||
- continue - continue the config process with an answer
|
- continue - continue the config process with an answer
|
||||||
- all - ask all the config questions not just the post config ones
|
- all - ask all the config questions not just the post config ones
|
||||||
|
Loading…
Reference in New Issue
Block a user