Skip to content

Commit

Permalink
fix: better macOS asset error msg (electron#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao authored Feb 24, 2023
1 parent 8eec1fa commit ff2d7c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Updates {

if (!latest) {
const message = platform.includes(PLATFORM.DARWIN)
? "No updates found (needs asset matching *{mac,darwin,osx}*.zip in public repository)"
? "No updates found (needs asset matching *(mac|darwin|osx).*(-arm).*.zip in public repository)"
: "No updates found (needs asset containing win32-{x64,ia32,arm64} or .exe in public repository)";
notFound(res, message);
} else if (semver.lte(latest.version, version)) {
Expand Down
4 changes: 2 additions & 2 deletions test/update.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ test("Updates", async (t) => {
let body = await res.text();
t.equal(
body,
"No updates found (needs asset matching *{mac,darwin,osx}*.zip in public repository)"
"No updates found (needs asset matching *(mac|darwin|osx).*(-arm).*.zip in public repository)"
);

res = await fetch(`${address}/owner/repo-win32-zip/darwin/0.0.0`);
t.equal(res.status, 404);
body = await res.text();
t.equal(
body,
"No updates found (needs asset matching *{mac,darwin,osx}*.zip in public repository)"
"No updates found (needs asset matching *(mac|darwin|osx).*(-arm).*.zip in public repository)"
);
});
});
Expand Down

0 comments on commit ff2d7c0

Please sign in to comment.