std.process - avoid interaction with parent shell

Steven Schveighoffer schveiguy at
Mon Jul 20 20:55:52 UTC 2020

I am doing some scripting via D, and using std.process.execute to git 
clone things.

I don't want any user interaction. Occasionally, I get a repository that 
no longer exists (404). Then git comes up and asks for a 
username/password. I want it to just fail. Apparently git has no option 
to be non-interactive, it supposedly checks stdin to see if it's a tty, 
and only errors if it's not.

I tried redirecting /dev/null to stdin when executing my application 
(and I assumed that would pass onto the process child), but it still 
asks. What am I doing wrong?


myapp < /dev/null
Username for '':
Program pauses, waits for my input.


More information about the Digitalmars-d-learn mailing list