microsoft/VFSForGit

GVFS Sparse displays multiple lines with waiting symbol moving when being run from application

judemars opened this issue · 2 comments

When gvfs sparse runs inside my exe which calls it with the c# process.start method, and asynchronously prints it's output to stdout, it prints:

Running git status...-

Running git status...\

Running git status...\

Running git status...|

Running git status...|

Running git status.../

Running git status.../

Running git status...-

Running git status...-

Running git status...\

Running git status...Succeeded

@wilbaker mentioned that gvfs was supposed to be able to detect when it's being run by another process and not keep printing new lines to stdout. Is that only in a specific case that I need to replicate? Is there some way to tell gvfs not to do this?

@wilbaker mentioned that gvfs was supposed to be able to detect when it's being run by another process

I double checked the VFS4G code and it looks like I misremembered the VFS4G implementation. VFS4G checks if the output is redirected to a file.

and asynchronously prints it's output to stdout

To confirm, @judemars is your exe redirecting the output from gvfs sparse and writing it?

I just checked with @judemars offline and she confirmed that her process is redirecting the output of gvfs sparse.

I suspect we'll need to update and rename

public static bool IsConsoleOutputRedirectedToFileImplementation()
and have it checked if stdout is redirected to a named pipe as well.