Skip to content

Commit

Permalink
fix: 删除 ExecutablePath 与 product一致的验证
Browse files Browse the repository at this point in the history
  • Loading branch information
fanyong920 committed Feb 5, 2025
1 parent e8af4b7 commit 5d792c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions src/main/java/com/ruiyun/jvppeteer/launch/ChromeLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ public Browser launch(LaunchOptions options) throws IOException {
options.setArgs(new ArrayList<>());
}
this.executablePath = this.computeExecutablePath(options.getExecutablePath(), options.getPreferredRevision());
if (!Paths.get(this.executablePath).getFileName().toString().toLowerCase().contains(BrowserFetcher.fileName(options.getProduct(),null).toLowerCase())) {
throw new LaunchException("The ExecutablePath does not match the product, The executablePath is " + this.executablePath + ",but the product is " + options.getProduct());
}

//临时的 UserDataDir
String temporaryUserDataDir = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ public Browser launch(LaunchOptions options) throws IOException {
options.setArgs(new ArrayList<>());
}
this.executablePath = this.computeExecutablePath(options.getExecutablePath(), options.getPreferredRevision());
if (!Paths.get(this.executablePath).getFileName().toString().toLowerCase().contains(BrowserFetcher.fileName(options.getProduct(),null).toLowerCase())) {
throw new LaunchException("The ExecutablePath does not match the product, The executablePath is " + this.executablePath + ",but the product is " + options.getProduct());
}

//临时的 UserDataDir
String temporaryUserDataDir = null;
//自定义的 UserDataDir
Expand Down

0 comments on commit 5d792c2

Please sign in to comment.