docs: refresh rclone authorize help

This commit is contained in:
Nick Craig-Wood 2020-05-04 10:40:26 +01:00
parent f2b1fedc4f
commit 7f8d74e903
2 changed files with 24 additions and 9 deletions

View file

@ -429,14 +429,21 @@ func doConfig(id, name string, m configmap.Mapper, oauthConfig *oauth2.Config, o
break
}
if !isLocal() {
fmt.Printf("For this to work, you will need rclone available on a machine that has a web browser available.\n")
fmt.Printf("Execute the following on your machine (same rclone version recommended) :\n")
fmt.Printf(`For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
`)
if changed {
fmt.Printf("\trclone authorize %q -- %q %q\n", id, oauthConfig.ClientID, oauthConfig.ClientSecret)
} else {
fmt.Printf("\trclone authorize %q\n", id)
}
fmt.Println("Then paste the result below:")
fmt.Println("\nThen paste the result below:")
code := config.ReadNonEmptyLine("result> ")
token := &oauth2.Token{}
err := json.Unmarshal([]byte(code), token)