diff --git a/npm/@fastly/cli/update.js b/npm/@fastly/cli/update.js index 632f0ad5a..c69a4a7f0 100644 --- a/npm/@fastly/cli/update.js +++ b/npm/@fastly/cli/update.js @@ -74,6 +74,7 @@ let response = await fetch( ); if (!response.ok) { console.error( + '%s %o', `Response from https://api.github.com/repos/fastly/cli/releases/tags/${tag} was not ok`, response ); @@ -87,10 +88,11 @@ let assets = await fetch( ); if (!assets.ok) { console.error( + '%s %o', `Response from https://api.github.com/repos/fastly/cli/releases/${id}/assets was not ok`, assets ); - console.error(await response.text()); + console.error(await assets.text()); process.exit(1); } assets = await assets.json(); @@ -120,7 +122,11 @@ for (const info of packages) { const browser_download_url = asset.browser_download_url; const archive = await fetch(browser_download_url); if (!archive.ok) { - console.error(`Response from ${browser_download_url} was not ok`, archive); + console.error( + '%s %o', + `Response from ${browser_download_url} was not ok`, + archive + ); console.error(await response.text()); process.exit(1); }