From 7971845fd4dedb30acf46bb85ac0be3aed7dd0a8 Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Tue, 4 Jun 2019 13:20:00 +0200 Subject: [PATCH] idf.py: Don't expect "_" env. variable to be available from PowerShell --- tools/idf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/idf.py b/tools/idf.py index a075dbd43f..cdaf84ecd0 100755 --- a/tools/idf.py +++ b/tools/idf.py @@ -1113,7 +1113,7 @@ if __name__ == "__main__": WINPTY_VAR = "WINPTY" WINPTY_EXE = "winpty" if ("MSYSTEM" in os.environ) and ( - not os.environ["_"].endswith(WINPTY_EXE) and WINPTY_VAR not in os.environ + not os.environ.get("_", "").endswith(WINPTY_EXE) and WINPTY_VAR not in os.environ ): os.environ[WINPTY_VAR] = "1" # the value is of no interest to us # idf.py calls itself with "winpty" and WINPTY global variable set