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

Execute roslynator analyze doesn't work in some case #1263

Closed
jjadotP opened this issue Nov 21, 2023 · 2 comments · Fixed by #1265
Closed

Execute roslynator analyze doesn't work in some case #1263

jjadotP opened this issue Nov 21, 2023 · 2 comments · Fixed by #1265

Comments

@jjadotP
Copy link

jjadotP commented Nov 21, 2023

Product and Version Used:
Roslynator Version: 0.7.1.0
Roslynator Target Framework: .NET Core
Roslyn Version: 4.7.0.0

Steps to Reproduce:

  1. open the folder where the sln is located with cygwin or git bash (with default configuration)
  2. execute '~/.dotnet/tools/roslynator analyze'
  3. The execution is blocked

Actual Behavior:
When I execute with argument -v diag, the return before blocking is
~/.dotnet/tools/roslynator analyze -v diag
Roslynator Version: 0.7.1.0
Roslynator Target Framework: .NET Core
Roslyn Version: 4.7.0.0

When I execute with argument -m, I have the same result (example : roslynator analyze -m "C:\Program Files\dotnet\sdk\6.0.415")
When I execute Powershell on git bash and after I tried to launch 'roslynator analyze' that doesn't work too
When I execute in a Powershell command open via windows or in cmd windows command that work correctly.

I'm trying to automate tasks via python scripts and I don't know on which environment it will be executed. I have the same problem if I try to run roslynator in pycharm's venv.

Expected Behavior:
I wait a correct execution because that work in cmd windows and in powershell windows.
That must analyze solution.

@josefpihrt
Copy link
Collaborator

Hi,

Thanks for the report, I can reproduce the bug.

The issue is that Console.IsInputRedirected returns true on git bash which causes execution to block when program tries to read from input stream.

@josefpihrt
Copy link
Collaborator

dotnet/runtime#95079

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

Successfully merging a pull request may close this issue.

2 participants