appcenter-cli blocked for telemetry permission when running in CI. I couldn't answer Y if I wanted to, so I think it should skip the prompt and assume no telemetry when running non-interactively.
running into this while trying to get CI setup -- any workarounds for the time being?
edit: looks like i can just call individual cmds with the token option (instead of logging in): --token $MY_TOKEN
I found some tricks to make it work in a CI environment (CircleCI in my case).
To avoid the telemetry question, I snooped around in the code and found:
https://github.com/Microsoft/appcenter-cli/blob/48cbf64dc384e6dcc33b8d7ef19eee509f0923be/.travis.yml#L8
To avoid logging in, I used:
https://github.com/Microsoft/appcenter-cli/blob/29a0714752dd1d55fe34582974a3454e2e47074f/src/util/profile/environment-vars.ts#L4
Also note that Yarn global packages are not supported by default. I used the following to work around it:
echo 'export PATH=$(yarn global bin):$PATH' >> $BASH_ENV
source $BASH_ENV
yarn global add appcenter-cli
You should also be able to switch telemetry off with the following command:
appcenter telemetry off
This will save a .json file using the same mechanism as when you answer Y or N.
Looking in the code - it _should_ already skip the question if you're not interactive:
if (!terminal.isInteractive()) {
return Promise.resolve(false);
}
So I'm going to convert this to a Bug rather than a Feature Request :)
appears: --disable-telemetry is a thing
As export-mike said, passing the flag --disable-telemetry solves this issue. Alternatively, --quiet can be passed to enable telemetry but not ask any interactive question.