build: fix publish-to-npm script post requests migration
This commit is contained in:
parent
a11a234eac
commit
0c1f762119
2 changed files with 3 additions and 1 deletions
|
@ -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}`);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue