-
Notifications
You must be signed in to change notification settings - Fork 492
Description
I'm configuring gam in a containerized environment (google cloud run) and noticed that the first command I run includes some configuration steps gam has taken in the stdout. That resulted in my script attempting to process these lines as if they were csv lines in a subsequent step, which hadn't occurred when running locally.
Full steps to reproduce the issue:
-
Install gam with very minimal set up, only the credential files copied in to the default location expected by gam (~/.gam/oauth2.txt etc) and no gam.cfg
-
gam command from script:
/usr/local/bin/gam redirect csv - print users fields primaryEmail
Expected outcome: Only csv output in stdout
Actual outcome: stdout includes additional lines, e.g.:
primaryEmail
[email protected]
[email protected]
[email protected]
Created: /root/.gam/gamcache
Created: /root/Downloads
Config File: /root/.gam/gam.cfg, Initialized
I added an initial gam command to my entrypoint script (that handles mounting the secrets) in order to trigger the setup, to more closely follow the installation instructions and work around this:
gam config drive_dir /tmp/GAMWork verify
...but everything else was functioning fine without needing that initialization, so that extra command doesn't seem to be technically necessary. My assumption is those output lines should probably be stderr instead of stdout?
I realise a fair answer is "I should initialize gam"... but in a case where someone doesn't, ending up with rogue lines on the end of what's assumed to be csv output seems less than ideal.