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

credentials specified 

Fixes #5104
This commit is contained in:
Ansh Mittal 2021-04-13 19:41:36 +05:30 committed by Nick Craig-Wood
parent 3e96752079
commit b456be4303

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)