From: Manuela Hutter Date: Tue, 31 Jul 2012 12:02:50 GMT Subject: Return code in cmd (git describe) Message-ID: Hi, we have some python scripts that are run from Visual Studio, and one of them fails because of a wrong git return code when calling 'git describe --dirty' Here's the issue: ============= import subprocess GIT_EXE = "" GIT_SRC = "" # call 'git describe --dirty': run_git = subprocess.Popen([GIT_EXE, "describe", "--dirty"], cwd=GIT_SRC, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (output, output_err) = run_git.communicate() print "Returncode: %s" % run_git.returncode print "Output: %s" % output.strip() ============= Run from wingw, the return code is 0. Run from cmd, the return code is 1. Why? Thanks, Manuela