Re: Processes sometimes don't appear to execute, on windows

"Nelson, Erick" <Erick.Nelson-NXabUB82sh5Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.lang.groovy.user
Message-ID <BN0PR13MB4760E2A1CC410809BF58E82EE7889@BN0PR13MB4760.namprd13.prod.outlook.com>
What is the exit value?
Is there any output to stdout or stderr?



def proc = 'git status'.execute() // your git command here
def stdout = new StringBuilder()
def stderr = new StringBuilder()
proc.waitForProcessOutput(stdout,stderr)
println "stdout = $stdout"
println "stderr = $stderr"
println "exitValue = ${proc.exitValue()}"



From: Kendall Shaw <kshaw-BLmIX6/[email protected]>
Date: Saturday, October 30, 2021 at 10:16 AM
To: users-GSC0n/0aZo1d/SJB6HiN2Ni2O/[email protected] <users-GSC0n/0aZo1d/SJB6HiN2Ni2O/[email protected]>
Subject: Processes sometimes don't appear to execute, on windows
I'm trying to execute git commands:

git init
git add
git commit
git status --porcelain

I've tried using variations of:

def p = "cmd /c dir".execute()

and waitForProcessOutput

and even using ProcessBuilder directly.

On my laptop it all works. On windows server, the commands sometimes
don't appear to execute.

Any ideas?

Kendall
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.