Skip to content

Commit

Permalink
1.3
Browse files Browse the repository at this point in the history
- Fixed search algo of node.js releases (windows)
  • Loading branch information
Osiris-Team committed Oct 8, 2021
1 parent 24dc034 commit 657af01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/osiris/headlessbrowser/NodeContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.rauschig.jarchivelib.ArchiverFactory;

import java.io.*;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.ArrayList;
Expand Down Expand Up @@ -70,7 +71,7 @@ public NodeContext(File installationDir, OutputStream debugOutput, int timeout)
for (Element e :
docLatest.getElementsByTag("a")) {
String attr = e.attr("href");
if (isCorrectFileForOs(attr)) {
if (isCorrectFileForOs(new URL(attr).getFile())) {
downloadUrl = url + attr;
break;
}
Expand Down

0 comments on commit 657af01

Please sign in to comment.