prasmussen / gdrive

Google Drive CLI Client
MIT License
8.99k stars 1.19k forks source link

Service account path is wrong when using ~ #641

Open devnoot opened 2 years ago

devnoot commented 2 years ago

I'm seeing an issue where I can't specify the service account path with ~

For example

gdrive --service-account ~/.config/gdrive/FILENAME.json list

gives me

Failed getting oauth client: Service account filename "/home/USERNAME/.gdrive/home/USERNAME/.config/gdrive/FILENAME.json" not found

I believe the issue is that the --config needs to be set to ~/.config/gdrive but if --config isn't supplied while --service-account is, gdrive should respect the --service-account path, or at least use $XDG_CONFIG_HOME if it's available.