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

Build console progress bar doesn't show when using 'gitbash on Windows' terminals #416

Closed
yamgent opened this issue Aug 3, 2018 · 9 comments · Fixed by #1654
Closed

Comments

@yamgent
Copy link
Member

yamgent commented Aug 3, 2018

Tell us about your environment

  • MarkBind Version: 1.12.0

What did you do? Please include the actual source code causing the issue.
When building pages, a progress bar is shown. However, when using gitbash on Windows terminals (or any mintty terminals), the progress bar does not show.

Issue is related to visionmedia/node-progress#170.

What did you expect to happen?

What actually happened? Please include the actual, raw output.

@Xenonym
Copy link
Contributor

Xenonym commented Dec 18, 2018

The fix for visionmedia/node-progress#170 has been merged, but the bug still happens even on progress@2.0.3, which includes the fix. Thus, that doesn't seem to be the cause.

After some investigation, it seems like this bug is actually related to visionmedia/node-progress#110. The PR referenced in the issue visionmedia/node-progress#168 fixes this bug with the forceTTY option, but it has not yet been merged.

@tlylt
Copy link
Contributor

tlylt commented Aug 18, 2021

Hello,

I tried running npm run test in markbind/packages/cli to check whether the built progress bar is shown correctly.
I'm using Windows 10 btw.

  • cmd with Vscode: works
  • bash within Vscode: works
  • bash terminal: works
  • cmd terminal (via windows terminal): works

Not sure if the issue has already been resolved. If the issue is related to the bug referenced in the above comment, then a quick patch is possible, as suggested here. If not perhaps we can safely close this issue:)
@ang-zeyu (a light ping 👀 as it has been a few years, not sure the above devs are still watching this issue... If you could weigh in on this?)

@ang-zeyu
Copy link
Contributor

Thanks for investigating this! @tlylt Good to see it works on a whole bunch of terminals.

I'm still able to produce this via gitbash running on mintty 3.5, although strangely wsltty works fine.

In any case, I think this issue is a little out of our control. Rather maybe we could insert a one / 2 liner into the gettingStarted section in the documentation to recommend some terminals that are known to work.

@tlylt
Copy link
Contributor

tlylt commented Aug 19, 2021

Thanks for investigating this! @tlylt Good to see it works on a whole bunch of terminals.

I'm still able to produce this via gitbash running on mintty 3.5, although strangely wsltty works fine.

In any case, I think this issue is a little out of our control. Rather maybe we could insert a one / 2 liner into the gettingStarted section in the documentation to recommend some terminals that are known to work.

Hi @ang-zeyu, hmm I am not familiar with terminals or console stuff, but I could try to apply the patch as suggested by others facing similar issues and send up a PR for you to verify if that works for "gitbash on mintty 3.5". Do you think that will be ok?

Alternatively, I can add a note in the docs to warn users (perhaps as a footnote in the getting started section).
I think overall the user experience is not greatly impacted by this issue.

Please let me know which is preferred :)

@ang-zeyu
Copy link
Contributor

apply the patch as suggested by others

👀

if its fixable, let's try that!

gitbash on mintty 3.5

it should come packaged in the latest version from here:
https://git-scm.com/downloads

@tlylt
Copy link
Contributor

tlylt commented Aug 20, 2021

apply the patch as suggested by others

👀

if its fixable, let's try that!

gitbash on mintty 3.5

it should come packaged in the latest version from here:
https://git-scm.com/downloads

Hi @ang-zeyu , could you help verify if it works with #1654 pls?

At the moment I have added node-progress with the relevant patch into markbind/packages/core/lib, I think having a fork and use the forked version is also a possible solution (provided that this does solve the issue). I am not sure what is the recommended practice but in markbind I see some patched npm packages such as live-server so I am assuming this is ok.

I am unable to reproduce the result even though I think I am using gitbash coming from git. I tried git-bash and git-cmd and both are fine with or without the fix:
image

@ang-zeyu
Copy link
Contributor

@tlylt no dice, still no progress bar on your PR branch:

ss

@ang-zeyu
Copy link
Contributor

ang-zeyu commented Aug 21, 2021

Might be mistaken but the terminal in your screenshot dosen't seem like the default mintty that comes with the git installation as well (blue bar on top). Might be what's causing a false positive 🤔

@tlylt
Copy link
Contributor

tlylt commented Aug 21, 2021

Hi @ang-zeyu, thank you for your kind help in verifying the PR. I finally made some progress on this :)

For the false positive, it might be due to the fact that I did not choose the option with mintty when installing git (see screenshot below):
image

I did that because some tutorials that I have seen recommended the second option for windows 10, as the introduction of windows terminal and wsl probably makes working with cli easier nowadays.

I have tested on my laptop and I was getting the same result as you, probably because on my laptop I went with the default git installation.

On further inspection of the patch code, I found out that I misunderstood the fix PR raised over at node-progress and I did not invoke the code properly (Big warning for me to be caution with code that I don't understand fully 😂 ). I have updated the patch and verified that it works on my laptop.

I shall continue the conversation over on my patch PR and make it ready to merge soon:)

@tlylt tlylt mentioned this issue Aug 31, 2021
9 tasks
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.

4 participants