On Windows, the default credentials file is located in the %APPDATA%\gcloud\application_default_credentials.json. The existing implementation was looking for credentials in
$HOME/.config/gcloud/application_default_credentials.json, which only works on MacOS and Linux.
This change creates a config_dir() function that has different implementations for Linux/MacOS and Windows platforms, and returns the appropriate path for each.
On Windows, the default credentials file is located in the
%APPDATA%\gcloud\application_default_credentials.json
. The existing implementation was looking for credentials in$HOME/.config/gcloud/application_default_credentials.json
, which only works on MacOS and Linux.This change creates a
config_dir()
function that has different implementations for Linux/MacOS and Windows platforms, and returns the appropriate path for each.