Skip to content

Commit 59fe467

Browse files
committed
Allow passing a test user home
1 parent 755b99c commit 59fe467

File tree

1 file changed

+4
-1
lines changed
  • mcp/mcp-cli-api/src/main/java/software/amazon/smithy/java/mcp/cli

1 file changed

+4
-1
lines changed

mcp/mcp-cli-api/src/main/java/software/amazon/smithy/java/mcp/cli/ConfigUtils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ private static Path getSmithyMcpCliHome() {
8888
}
8989

9090
public static Path resolveFromHomeDir(String... paths) {
91-
String userHome = System.getProperty("user.home");
91+
String userHome = System.getenv("TEST_USER_HOME");
92+
if (userHome == null) {
93+
userHome = System.getProperty("user.home");
94+
}
9295
return Paths.get(userHome, paths);
9396
}
9497

0 commit comments

Comments
 (0)