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

Handle complex azureauth output #22

Merged
merged 2 commits into from
Apr 30, 2024
Merged

Handle complex azureauth output #22

merged 2 commits into from
Apr 30, 2024

Conversation

muiriswoulfe
Copy link
Member

azureauth on some devices is returning a complex output, in the format below. This change ensures that ado-npm-auth will work with both this output and the one previously supported.

2 tests have been added to validate this.

By the way, the linter automatically applied some styling fixes for the test file, which I left in place. I can revert these if desired.


> [email protected] npx
> azureauth --version

0.8.5.0

@Stuart-Wilcox
Copy link
Contributor

So the complex output is just extra empty lines around the actual version info?

@muiriswoulfe
Copy link
Member Author

So the complex output is just extra empty lines around the actual version info?

Empty lines and lines beginning with '>'. See the example in my PR description.

@Stuart-Wilcox
Copy link
Contributor

Ah sorry I misunderstood that as being what you ran to generate the output. I think we might need to use the --silent flag on the npm exec command. Would you be able to try something like that on your system and see if it works to suppress that noisy output

@muiriswoulfe
Copy link
Member Author

Ah sorry I misunderstood that as being what you ran to generate the output. I think we might need to use the --silent flag on the npm exec command. Would you be able to try something like that on your system and see if it works to suppress that noisy output

I tried npm exec --silent --yes azureauth -- --version and that works. That's a better solution for sure, so I'm happy to update my PR to that fix.

By the way, I found that all calls to azureauth can have this issue so the change will need to be made throughout to those calls.

@Stuart-Wilcox Stuart-Wilcox merged commit 3b55237 into microsoft:main Apr 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants