Skip to content

Commit c74ef8e

Browse files
committed
Copy 4753d81554e9018e788f9e63d114aa50a5f7490e from copilot-sdk
1 parent 62d0fa0 commit c74ef8e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/test/java/com/github/copilot/sdk/TestUtil.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ public static String tempPath(String filename) {
5555
* {@code null} if none was found
5656
*/
5757
static String findCliPath() {
58-
String copilotInPath = findCopilotInPath();
59-
if (copilotInPath != null) {
60-
return copilotInPath;
61-
}
62-
6358
String envPath = System.getenv("COPILOT_CLI_PATH");
6459
if (envPath != null && !envPath.isEmpty()) {
6560
return envPath;
6661
}
6762

63+
String copilotInPath = findCopilotInPath();
64+
if (copilotInPath != null) {
65+
return copilotInPath;
66+
}
67+
6868
Path current = Paths.get(System.getProperty("user.dir"));
6969
while (current != null) {
7070
Path cliPath = current.resolve("nodejs/node_modules/@github/copilot/index.js");

0 commit comments

Comments
 (0)