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

Fix windows terminal support #267

Merged
merged 3 commits into from
Mar 2, 2024

Conversation

Kasparsu
Copy link
Contributor

Fixing windows terminal support as well as powershell and cmd support since they weren't outputing anything either.

src/main.c Outdated
@@ -268,6 +268,15 @@ char* resolveEntryPath(ENGINE* engine, char* entryArgument, bool autoResolve) {

int main(int argc, char* argv[])
{
#ifdef __MINGW32__
// WT_SESSION = Windows terminal, SESSIONNAME=Console == Powershell and CMD and TERM_PROGRAM=Tabby == Tabby
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worries me that we have to customise this for each particular terminal.

There's a chance someone tries to use some other unusual terminal and it breaks. Any chance we could do better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seems so at the moment unless there are some way of determining wether console is allready attached or not. In anycase there is only few options for terminals on windows unlike linux or mac. Im not saying that there can't be new issues about it down the line but they either can be fixed by adding it to the list or not (if there is no env var to make it unique).As far as I know lot of users use powershell and lot use win terminal now that it comes as a default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could add a flag that is checked at the start that also applies this fix. ./dome.exe -t for example and you could use it with other flags then ./dome.exe -t --help for example even if there is an issue with unknown terminal then there would be a functional workaround altho funny problem with it is that you get no output what so ever so if people don't read about this in docs they won't know about the flag like I didn't know about the -c flag until I looked into dome-out.log and found that it outputs --help in there as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@avivbeeri is this more acceptable 887ebfc

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to do a build and verify it for myself before I approve it, but that looks quite good!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it do be bit wonky on cmd and ps but hey it outputs stuff so thats improvement. If run trough windows terminal its good on all 3 (ps, cmd, git bash) and on tabby it works fine as well and pure git bash works just as it did before,

@avivbeeri
Copy link
Collaborator

Sorry to have left this hanging for so long. I intend to look at it this week, and maybe push it out as part of a patch release before the weekend.

@avivbeeri
Copy link
Collaborator

Turns out, I'm not in a position to build this for windows right now, but it's innocuous enough that I'm happy to merge it. You should add yourself to the AUTHORS file before I do :)

@avivbeeri avivbeeri merged commit b754b96 into domeengine:develop Mar 2, 2024
7 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