forked from TrueCloudLab/rclone
oauthutil: fix headless config for drive and gcs - fixes #158
This commit is contained in:
parent
177dbbc29a
commit
2e9f2ea3d3
1 changed files with 6 additions and 4 deletions
|
@ -197,10 +197,12 @@ func Config(name string, config *oauth2.Config) error {
|
|||
fmt.Printf(" * Say Y if not sure\n")
|
||||
fmt.Printf(" * Say N if you are working on a remote or headless machine or Y didn't work\n")
|
||||
useWebServer = fs.Confirm()
|
||||
// copy the config and set to use the internal webserver
|
||||
configCopy := *config
|
||||
config = &configCopy
|
||||
config.RedirectURL = RedirectURL
|
||||
if useWebServer {
|
||||
// copy the config and set to use the internal webserver
|
||||
configCopy := *config
|
||||
config = &configCopy
|
||||
config.RedirectURL = RedirectURL
|
||||
}
|
||||
}
|
||||
|
||||
// Make random state
|
||||
|
|
Loading…
Reference in a new issue