Context
In #4692 we added a config key to disable the spinner. This is useful (among other things) because of limitations with the PowerShell error stream in Azure Functions.
We can now just disable the spinner using m365 cli config set --key showSpinner --value false
However: the command m365 cli config set --key showSpinner --value false itself also triggers the spinner.
We can work around that by piping the error stream away using
m365 cli config set --key showSpinner --value false 2>$null
But it would be better if we implement an easier route.
Solution
Add none to the available values of the global output option. Specifying this value will force the CLI to not write anything to any output stream. (Be it stderr or stdout)
It can then be used (among other things) when running the config set command to block the spinner from showing up.
m365 cli config set --key showSpinner --value false --output none
Implementation
The Cli runtime logs using the Cli.log and Cli.error methods. These should in all places be ignored if output=none.
Context
In #4692 we added a config key to disable the spinner. This is useful (among other things) because of limitations with the PowerShell error stream in Azure Functions.
We can now just disable the spinner using
m365 cli config set --key showSpinner --value falseHowever: the command
m365 cli config set --key showSpinner --value falseitself also triggers the spinner.We can work around that by piping the error stream away using
But it would be better if we implement an easier route.
Solution
Add
noneto the available values of the globaloutputoption. Specifying this value will force the CLI to not write anything to any output stream. (Be itstderrorstdout)It can then be used (among other things) when running the config set command to block the spinner from showing up.
Implementation
The Cli runtime logs using the
Cli.logandCli.errormethods. These should in all places be ignored if output=none.