drive: don't open browser when service account...

credentials specified 

Fixes #5104
This commit is contained in:
Ansh Mittal
2021-04-17 19:49:53 +01:00
committed by Nick Craig-Wood
parent 3e96752079
commit b456be4303
+1 -1
View File
@@ -199,7 +199,7 @@ func init() {
m.Set("root_folder_id", "appDataFolder")
}
if opt.ServiceAccountFile == "" {
if opt.ServiceAccountFile == "" && opt.ServiceAccountCredentials == "" {
err = oauthutil.Config(ctx, "drive", name, m, driveConfig, nil)
if err != nil {
log.Fatalf("Failed to configure token: %v", err)