You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mistakenly interpret "script requires sudo" in the docs as meaning the whole script requires sudo, and so adjust the shown command to be curl https://cli-assets.heroku.com/install.sh | sudo sh (I had imagined that the reason sudo wasn't included in the shown command, was that it was intended to be run from inside docker containers where the user may likely already be root, so didn't think twice before adding)
Run heroku update to confirm installed and up to date
Run heroku login
ed@WSL:/c/Users/Ed/src$ curl https://cli-assets.heroku.com/install.sh | sudo sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1892 100 1892 0 0 14119 0 --:--:-- --:--:-- --:--:-- 14225
Installing CLI from https://cli-assets.heroku.com/heroku-linux-x64.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15.4M 100 15.4M 0 0 1971k 0 0:00:08 0:00:08 --:--:-- 2615k
v11.3.0
heroku installed to /usr/local/bin/heroku
heroku/7.19.3 linux-x64 node-v11.3.0
ed@WSL:/c/Users/Ed/src$ heroku update
heroku: Updating CLI... already on latest version: 7.19.3
ed@WSL:/c/Users/Ed/src$ heroku login
(node:440) [EACCES] Error Plugin: heroku: EACCES: permission denied, open '/home/ed/.cache/heroku/lastrun'
module: @oclif/config@1.9.0
task: runHook init
plugin: heroku
root: /usr/local/lib/heroku
See more details with DEBUG=*
heroku: Press any key to open up the browser to login or q to exit:
Logging in... done
Logged in as <SNIP>
(node:440) [EACCES] Error Plugin: heroku: EACCES: permission denied, mkdir '/home/ed/.cache/heroku/autocomplete'
module: @oclif/config@1.9.0
task: runHook recache
plugin: heroku
root: /usr/local/lib/heroku
See more details with DEBUG=*
What is the expected behavior?
That either install.sh handles being run with sudo, or else the sudo reference in the docs is clarified to indicate that the script will self-sudo, and that the user shouldn't do so themselves.
That if a permissions error occurs, the login command didn't try to open the browser anyway for the command to then output further errors after clicking sign-in in the browser.
Possibly for the Heroku CLI to handle the .cache directly being owned by the wrong user and output a more user-friendly message.
The text was updated successfully, but these errors were encountered:
edmorley
changed the title
Standalone install method results in CLI permission errors when run with sudo
CLI standalone install method results in permission errors if run with sudo
Dec 5, 2018
I had the same problem trying to install Heroku on WSL.
I can confirm that using curl https://cli-assets.heroku.com/install.sh | sudo sh allows to install it although some errors pop up every now and then
Do you want to request a feature or report a bug?
Bug (or at least user ~error/confusion that could be handled more gracefully)
What is the current behavior?
curl https://cli-assets.heroku.com/install.sh | sudo sh
(I had imagined that the reasonsudo
wasn't included in the shown command, was that it was intended to be run from inside docker containers where the user may likely already beroot
, so didn't think twice before adding)heroku update
to confirm installed and up to dateheroku login
What is the expected behavior?
install.sh
handles being run withsudo
, or else thesudo
reference in the docs is clarified to indicate that the script will self-sudo, and that the user shouldn't do so themselves.login
command didn't try to open the browser anyway for the command to then output further errors after clicking sign-in in the browser..cache
directly being owned by the wrong user and output a more user-friendly message.The text was updated successfully, but these errors were encountered: