Can't capture 'dotnet format --verify-no-changes' output into a Powershell variable
- Dominant language
- No language data
- Stars
- 1.9k
- Forks
- 173
- Avg merge
- 10d 13h
- Merged PRs (30d)
- 1
Description
## Summary
If you run the command `dotnet format --verify-no-changes` in PowerShell and try to assign the output of the command to a variable, it doesn't work.
However, if you run a different command such as `dotnet build`, I am able to capture the output.
I know that there are work arounds for that (json report), but I believe the output behavior of the commands should be consistent across the board.
## Steps
* Have a small .NET 6 project that needs formatting (i.e. extra spaces).
* Run: `PS > $output = dotnet format --verify-no-changes`
* **The tool will output the results, but the variable $output will be empty.**
* If you try to do the same thing with `dotnet build`, you can see that the variable has the output of the command.


Powershell: 7.2.1
dotnet: 6.0.102
dotnet format version: 6.0.252703+68bc36719088c86b0ff01334039b0611741b8276
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.