Skip to content

Commit

Permalink
fix(publisher): throw custom 404 if we cant find the release
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Dec 30, 2016
1 parent 8653b62 commit 6f4e1ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/electron-forge-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ const main = async () => {
repo: forgeConfig.github_repository.name,
per_page: 100,
})).find(testRelease => testRelease.tag_name === program.tag || `v${packageJSON.version}`);
if (!release) {
throw { code: 404 }; // eslint-disable-line
}
} catch (err) {
if (err.code === 404) {
// Release does not exist, let's make it
Expand Down

0 comments on commit 6f4e1ed

Please sign in to comment.