Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Commit a07d0a5

Browse files
committed
fix: update GCloud detection on Windows
1 parent 09fac9d commit a07d0a5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

google-cloud-core/src/main/java/com/google/cloud/testing/BaseEmulatorHelper.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,8 @@ public Process getProcess() {
275275
}
276276

277277
private boolean isGcloudInstalled() {
278-
Map<String, String> env = System.getenv();
279-
for (String envName : env.keySet()) {
280-
if ("PATH".equals(envName)) {
281-
return env.get(envName).contains("google-cloud-sdk");
282-
}
283-
}
284-
return false;
278+
String path = System.getenv("PATH");
279+
return path != null && path.contains("google-cloud-sdk");
285280
}
286281

287282
private boolean isEmulatorUpToDate() throws IOException, InterruptedException {

0 commit comments

Comments
 (0)