Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running m365 setup --scripting on an Azure PowerShell Function does not set the errorOutput stream correctly #5977

Open
martinlingstuyl opened this issue Apr 12, 2024 · 1 comment

Comments

@martinlingstuyl
Copy link
Contributor

It seems I've got an issue here.

I've got an Azure Function on PowerShell Core (on Windows OS)
I'm running the CLI for Microsoft 365 on it. (version 7.7 beta)
I'm configuring the CLI using m365 setup --scripting --output none.

I'm now expecting the following keys:

{
  "autoOpenLinksInBrowser": false,
  "copyDeviceCodeToClipboard": false,
  "output": "json",
  "printErrorsAsPlainText": false,
  "prompt": false,
  "showHelpOnFailure": false,
  "showSpinner": false,
  "errorOutput": "stdout"
}

But instead, if I write m365 config list to the output log, I'm getting the following:
image

I'm missing the errorOutput config key, which means that errors are written to the stderr/error stream, instead of to the stdout/output stream. I want to write them to stdout, so I now have to run an additional m365 config set.

The command m365 setup should detect that powershell is running, but it doesn't.

@waldekmastykarz
Copy link
Member

I wonder what's the parent process is. We should extend the setup command with debug logging which outputs the parent process name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants