Skip to content

Commit 0b325f4

Browse files
committed
test(ide): pin user.home so the launcher tests ignore an installed cstudy
1 parent d6ce82b commit 0b325f4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎cli/tests/adapters/ide/test_launcher_jar.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def javac_feature_release() -> str | None:
3535
def run_launcher(arguments: list[str], environment: dict[str, str], tmp_path: Path):
3636
jar = tmp_path / "cstudy-launcher.jar"
3737
jar.write_bytes(launcher_jar())
38-
command = ["java", "-jar", str(jar), *arguments]
38+
# The JVM takes user.home from the password database on macOS, not from HOME.
39+
command = ["java", f"-Duser.home={environment['HOME']}", "-jar", str(jar), *arguments]
3940
return subprocess.run(command, env=environment, capture_output=True, text=True, check=False)
4041

4142

0 commit comments

Comments
 (0)