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
In ConfigCommand.php line 195:
touch(): Unable to create file /home/brad/.config/composer/config.json because Permission denied
config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [-j|--json] [-m|--merge] [--append] [--source] [--] [<setting-key> [<setting-value>...]]
And I expected this to happen:
These two steps are part of a script I use to setup a new machine and usually works fine to run a config command directly after installing
The text was updated successfully, but these errors were encountered:
The installer creates the composer home (~/.config/composer) so I'm thinking if you use sudo there you probably want to pass -H to ensure HOME is set to root's home and not your user's home.
That way you don't have dirs created with root permissions in your user's home dir.
Yes but that's exactly the problem, it creates a dir in /home/brad/... with the root user as owner.
If you use sudo -H $HOME will be set to /root and you won't have that problem.
I don't know how it could have worked before.. You can also run the installer as your user and then sudo mv composer.phar /usr/bin/composer which is IMO better as it allows your user to run self-update then, and won't cause issues with the installer creating things as root. That's what we advise you do on https://getcomposer.org/download/ btw
My
composer.json
:not relevent
Output of
composer diagnose
:When I run this command:
First I installed composer
Then I tried to configure it:
I get the following output:
And I expected this to happen:
These two steps are part of a script I use to setup a new machine and usually works fine to run a config command directly after installing
The text was updated successfully, but these errors were encountered: