From c74ef8e498647bb852f3acc73fca513a657f305c Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Thu, 21 May 2026 14:30:00 -0700 Subject: [PATCH] Copy 4753d81554e9018e788f9e63d114aa50a5f7490e from copilot-sdk --- src/test/java/com/github/copilot/sdk/TestUtil.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/com/github/copilot/sdk/TestUtil.java b/src/test/java/com/github/copilot/sdk/TestUtil.java index d9462af87f..60494e902d 100644 --- a/src/test/java/com/github/copilot/sdk/TestUtil.java +++ b/src/test/java/com/github/copilot/sdk/TestUtil.java @@ -55,16 +55,16 @@ public static String tempPath(String filename) { * {@code null} if none was found */ static String findCliPath() { - String copilotInPath = findCopilotInPath(); - if (copilotInPath != null) { - return copilotInPath; - } - String envPath = System.getenv("COPILOT_CLI_PATH"); if (envPath != null && !envPath.isEmpty()) { return envPath; } + String copilotInPath = findCopilotInPath(); + if (copilotInPath != null) { + return copilotInPath; + } + Path current = Paths.get(System.getProperty("user.dir")); while (current != null) { Path cliPath = current.resolve("nodejs/node_modules/@github/copilot/index.js");