heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 380 forks source link

Using XDG_DATA_HOME on osx leads to permission denied error on /sw/share/heroku #1848

Open marcpa00 opened 8 years ago

marcpa00 commented 8 years ago
$ heroku -h
heroku-cli: Installing Toolbelt v4... !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       Permission denied - /sw/share/heroku (Errno::EACCES)
    Command:     heroku -h
    Version:     heroku-toolbelt/3.42.24 (x86_64-darwin10.8.0) ruby/1.9.3
    Error ID:    0df53884d2b14c5fba9a079bf345b382

    More information in /Users/marcpa/.heroku/error.log

Because something in my configuration (probably fink) defines XDG_DATA_HOME to /sw/share and that directory is owned by root, I get the permission denied.

I wonder if it is a good idea of assuming that XDG_DATA_HOME is a relyable source of system configuration on osx ?

At least, it would be nice to have a note in documentation about this environment variable and how it can be problematic with heroku on osx.

jdx commented 8 years ago

that directory is supposed to be used for user-specific files and should be writeable by the user so the spec can be followed http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html