Skip to content

Commit 3e5a5ba

Browse files
committed
fix env var check
1 parent 910e818 commit 3e5a5ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ def run_command(command: str, cwd: Path, env: Mapping[str, str]) -> None:
1414

1515
def check_env() -> Mapping[str, str]:
1616
# print the path environment variable
17-
PATH: str = os.environ["PATH"]
18-
JAVA_HOME: str | None = os.environ["JAVA_HOME"] or None
19-
GRAALVM_HOME: str | None = os.environ["GRAALVM_HOME"] or None
20-
MAVEN_HOME: str | None = os.environ["MAVEN_HOME"] or None
17+
PATH: str = os.getenv("PATH", "")
18+
JAVA_HOME: str | None = os.getenv("JAVA_HOME")
19+
GRAALVM_HOME: str | None = os.getenv("GRAALVM_HOME")
20+
MAVEN_HOME: str | None = os.getenv("MAVEN_HOME")
2121
if JAVA_HOME is None and GRAALVM_HOME is None:
2222
print("JAVA_HOME or GRAALVM_HOME environment variable must be set")
2323
sys.exit(1)

0 commit comments

Comments
 (0)