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

fix: fix gcloud SDK detection on Windows #384

Merged
merged 1 commit into from Feb 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -47,7 +47,6 @@
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -275,13 +274,8 @@ public Process getProcess() {
}

private boolean isGcloudInstalled() {
Map<String, String> env = System.getenv();
for (String envName : env.keySet()) {
if ("PATH".equals(envName)) {
return env.get(envName).contains("google-cloud-sdk");
}
}
return false;
String path = System.getenv("PATH");
return path != null && path.contains("google-cloud-sdk");
}

private boolean isEmulatorUpToDate() throws IOException, InterruptedException {
Expand Down