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

No output in git bash profile while there is output in pure git bash #16023

Closed
Kasparsu opened this issue Sep 23, 2023 · 5 comments
Closed

No output in git bash profile while there is output in pure git bash #16023

Kasparsu opened this issue Sep 23, 2023 · 5 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@Kasparsu
Copy link

Windows Terminal version

1.17.11461.0

Windows build number

10.0.22621.0

Other Software

https://github.com/domeengine/dome
git bash https://gitforwindows.org/

Steps to reproduce

  • download dome
  • execute it trough git bash profile in windows terminal
  • no output

Expected Behavior

running dome in command line should output log it does so when run with pure git bash

Actual Behavior

Program outputs nothing in windows terminal but does in pure git bash

@Kasparsu Kasparsu added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Sep 23, 2023
@Kasparsu
Copy link
Author

learned that -mconsole flag was not set and that kinda fixed it but now if application is run without terminal it it opens a console window

@Kasparsu
Copy link
Author

found a workaround, but still kinda weird that git bash without win terminal handles stuff differently then with.
domeengine/dome#267

@DHowett
Copy link
Member

DHowett commented Sep 27, 2023

Thanks for filing!

There's a few different variables here that I'm interested in. I haven't heard of -mconsole, so that might be one of these already.

Git Bash uses its own terminal emulator (mintty) by default.

Would you be able to test this in the original Windows Console?
You can get to it by explicitly running conhost, and then running git bash from inside the Command Prompt it launches.

If the Dome issue reproduces there, it's either a Dome or MSYS issue. If it doesn't, that's probably absolutely something under our control.

@DHowett DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Sep 27, 2023
@DHowett DHowett removed their assignment Sep 27, 2023
@Kasparsu
Copy link
Author

Yeah the issue was happening both in pure cmd as well as powershell so I guess that answers the question. We fixed it on the dome side by checking if console is attached and then attaching the console if not

 if(!GetStdHandle(STD_OUTPUT_HANDLE)) {
    if (AttachConsole(ATTACH_PARENT_PROCESS)) { 
      freopen("CONOUT$","wb",stdout);
      freopen("CONOUT$","wb",stderr);
    }
}

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Sep 28, 2023
@DHowett
Copy link
Member

DHowett commented Sep 28, 2023

Thanks so much for following up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

2 participants