3 # Copyright 2010 Google Inc. All Rights Reserved.
5 """Runs program specified in the command line with the substituted PATH.
7 This script is needed for to support building under Pulse which is unable
8 to override the existing PATH variable.
15 SUBST_PATH_ENV_VAR_NAME = "SUBST_PATH"
18 if SUBST_PATH_ENV_VAR_NAME in os.environ:
19 os.environ["PATH"] = os.environ[SUBST_PATH_ENV_VAR_NAME]
21 exit_code = subprocess.Popen(sys.argv[1:]).wait()
23 # exit_code is negative (-signal) if the process has been terminated by
24 # a signal. Returning negative exit code is not portable and so we return
31 if __name__ == "__main__":