Skip to content

Commit de18154

Browse files
ctruedenclaude
andcommitted
Fail clearly when tool has no download URL for the current platform
Tool.download() now throws IOException with a clear message when the download URL is null (e.g. micromamba on Windows ARM64) instead of propagating a NullPointerException from deep inside FilePaths.fileType. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9c6748e commit de18154

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • src/main/java/org/apposed/appose/tool

src/main/java/org/apposed/appose/tool/Tool.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ protected void execDirect(String... args) throws IOException, InterruptedExcepti
240240
}
241241

242242
protected File download() throws IOException, InterruptedException {
243+
if (url == null) {
244+
throw new IOException(name + " is not available for this platform (" +
245+
Platforms.PLATFORM + "). Please install it manually.");
246+
}
243247
try {
244248
return Downloads.download(name, url, this::updateDownloadProgress);
245249
}

0 commit comments

Comments
 (0)