This repository was archived by the owner on Dec 3, 2023. It is now read-only.
File tree
Expand file treeCollapse file tree1 file changed
+2
-8
lines changed google-cloud-core/src/main/java/com/google/cloud/testing
Expand file treeCollapse file tree1 file changed
+2
-8
lines changed Original file line number | Diff line number | Diff line change |
---|
|
47 | 47 | import java.util.Arrays;
|
48 | 48 | import java.util.List;
|
49 | 49 | import java.util.Locale;
|
50 |
| -import java.util.Map; |
51 | 50 | import java.util.concurrent.Callable;
|
52 | 51 | import java.util.concurrent.ExecutionException;
|
53 | 52 | import java.util.concurrent.TimeUnit;
|
@@ -275,13 +274,8 @@ public Process getProcess() {
|
275 | 274 | }
|
276 | 275 |
|
277 | 276 | 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"); |
285 | 279 | }
|
286 | 280 |
|
287 | 281 | private boolean isEmulatorUpToDate() throws IOException, InterruptedException {
|
|
You can’t perform that action at this time.
0 commit comments