Cli: `snap install heroku` fails on WSL2

Created on 12 Aug 2020  路  5Comments  路  Source: heroku/cli

Hello. I experienced a failure to install snap heroku package on WSL2 because it attempts to fetch https://cli-assets.heroku.com/wsl-x64. I guess it should be https://cli-assets.heroku.com/linux-x64. The backtrace suggests that oclif detects the environment as wsl but the fetch URL must not respect it.

$ sudo snap install heroku --classic
error: cannot perform the following tasks:
- Run configure hook of "heroku" snap if present (run hook "configure":
-----
heroku: Updating CLI... !
Error: HTTP Error 404 for GET https://cli-assets.heroku.com/wsl-x64
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>404 Not Found</h1>
<ul>
<li>Code: NoSuchKey</li>
<li>Message: The specified key does not exist.</li>
<li>Key: wsl-x64</li>
<li>RequestId: E2B4F03C5D75E411</li>
<li>HostId: dV3z9DlWX9s94IlpXAxy860zxke6dZ5WKwysU/a0DgITSOZBJjWf3l8hAjtFyigC3mwjDJX4uUA=</li>
</ul>
<hr/>
</body>
</html>
    at HTTP._request (/snap/heroku/3962/node_modules/http-call/lib/http.js:215:19)
    at async Function.request (/snap/heroku/3962/node_modules/http-call/lib/http.js:162:9)
    at async UpdateCommand.fetchManifest (/snap/heroku/3962/node_modules/@oclif/plugin-update/lib/commands/update.js:46:28)
    at async UpdateCommand.run (/snap/heroku/3962/node_modules/@oclif/plugin-update/lib/commands/update.js:26:26)
    at async UpdateCommand._run (/snap/heroku/3962/node_modules/@oclif/plugin-update/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/snap/heroku/3962/node_modules/@oclif/command/node_modules/@oclif/config/lib/config.js:173:24)
    at async Main.run (/snap/heroku/3962/node_modules/@oclif/command/lib/main.js:21:9)
    at async Main._run (/snap/heroku/3962/node_modules/@oclif/command/lib/command.js:44:20)
-----)

Most helpful comment

having the exact same issue

All 5 comments

having the exact same issue

Same here

Same here

Same problem

Found answer at this site: https://stackoverflow.com/questions/62380637/how-to-install-heroku-cli-on-wsl-2

You can install heroku-cli with this simple install script by heroku:
curl https://cli-assets.heroku.com/install.sh | sh

Was this page helpful?
0 / 5 - 0 ratings