diff --git a/script/release/get-asset.js b/script/release/get-asset.js index 99b6dbe4c24b..d2fa9022ad27 100644 --- a/script/release/get-asset.js +++ b/script/release/get-asset.js @@ -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}`); } diff --git a/script/release/publish-to-npm.js b/script/release/publish-to-npm.js index 89e6d691034e..ac1014b0f59a 100644 --- a/script/release/publish-to-npm.js +++ b/script/release/publish-to-npm.js @@ -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();