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}`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue