gcs: Don't configure the oauth token if service_account_file is supplied

This commit is contained in:
Nick Craig-Wood 2016-04-22 19:58:52 +01:00
parent 022ab4516d
commit 3a1198cac5
2 changed files with 7 additions and 15 deletions

View file

@ -62,6 +62,9 @@ func init() {
Description: "Google Cloud Storage (this is not Google Drive)",
NewFs: NewFs,
Config: func(name string) {
if fs.ConfigFile.MustValue(name, "service_account_file") != "" {
return
}
err := oauthutil.Config("google cloud storage", name, storageConfig)
if err != nil {
log.Fatalf("Failed to configure token: %v", err)