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

Show progress in git based installs #641

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

ninjamuffin99
Copy link
Contributor

closes #635

Adds a --progress flag to the git clone command, which will spit out the information / progress of the cloning operation.

This implementation will run a while loop that reads the available bytes as they come in and spits them out to the Sys.stdout, and will continue until it gets an EOF error (git clone operation finished), which then it will read all of the bytes + exit code and return it as usual.

@@ -193,6 +194,18 @@ abstract class Vcs implements IVcs {
// just in case process hangs waiting for stdin
p.stdin.close();

// In certain cases of git clones, it will hang on reading from stderr
// if we don't read from it. So we will always try to read from it.
Copy link
Member

Choose a reason for hiding this comment

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

The reason this was solved with threads on windows is that the same thing could happen with p.stdout and p.stderr at the same time, in which case the only solution is to read from both simultaneously (with separate threads).

However, the threads caused issues on Linux so I made it windows only in: b8c24a7. I suspect the same issue is also behind these crashes: #591

@skial skial mentioned this pull request Aug 21, 2024
1 task
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.

Display progress for Git based installs
2 participants