Skip to content

Commit

Permalink
build: fix publish-to-npm script post requests migration
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored and miniak committed Aug 18, 2021
1 parent b3af173 commit 97e4c56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion script/release/get-asset.js
Expand Up @@ -30,7 +30,7 @@ async function getAssetContents (repo, assetId) {
}

const fileResponse = await got(response.headers.location);
if (fileResponse.status !== 200) {
if (fileResponse.statusCode !== 200) {
console.error(fileResponse.headers, `${fileResponse.body}`.slice(0, 300));
throw new Error(`cannot download asset[${assetId}] from ${response.headers.location}, got status: ${fileResponse.status}`);
}
Expand Down
2 changes: 2 additions & 0 deletions script/release/publish-to-npm.js
Expand Up @@ -100,6 +100,8 @@ new Promise((resolve, reject) => {
);

fs.writeFileSync(path.join(tempDir, 'electron.d.ts'), typingsContent);

return release;
})
.then(async (release) => {
const currentBranch = await getCurrentBranch();
Expand Down

0 comments on commit 97e4c56

Please sign in to comment.