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

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import java.util.Arrays;
4848
import java.util.List;
4949
import java.util.Locale;
50-
import java.util.Map;
5150
import java.util.concurrent.Callable;
5251
import java.util.concurrent.ExecutionException;
5352
import java.util.concurrent.TimeUnit;
@@ -275,13 +274,8 @@ public Process getProcess() {
275274
}
276275

277276
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;
277+
String path = System.getenv("PATH");
278+
return path != null && path.contains("google-cloud-sdk");
285279
}
286280

287281
private boolean isEmulatorUpToDate() throws IOException, InterruptedException {

0 commit comments

Comments
 (0)