I know I've done something wrong, but I expect a sensible error message telling me what's wrong, so hear me out.
On my debian server, as root, I installed composer globally as indicated here:
https://getcomposer.org/doc/00-intro.md#globally
composer was installed correctly and worked as expected, but then when I tried it out requiring some package (which got installed succesfully), I got this message:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
So, since I am a good boy, I su-ed to the user www-data, and then I tried:
composer global require laravel/installer
(which is the same that had worked perfectly when run as root)
Expected:
a sensible error message from composer telling me whatever I am doing wrong
Observed
An error message from the OS telling composer what composer is doing wrong.
Namely, this was the error message:
[ErrorException]
chdir(): No such file or directory (errno 2)
global <command-name> [<args>]...
I'm pretty sure there's something wrong in installing composer as root and then trying to use it as another user - that doesn't seem wrong per se, but I'm probably missing some necessary step. Anyway, the error message I'm getting makes no sense whatsoever from the perspective of the user and gives me no clue of what I am supposed to fix.
I know I've done something wrong, but I expect a sensible error message telling me what's wrong, so hear me out.
On my debian server, as root, I installed composer globally as indicated here:
https://getcomposer.org/doc/00-intro.md#globally
composerwas installed correctly and worked as expected, but then when I tried it out requiring some package (which got installed succesfully), I got this message:So, since I am a good boy, I
su-ed to the userwww-data, and then I tried:(which is the same that had worked perfectly when run as root)
Expected:
a sensible error message from composer telling me whatever I am doing wrong
Observed
An error message from the OS telling composer what composer is doing wrong.
Namely, this was the error message:
I'm pretty sure there's something wrong in installing
composeras root and then trying to use it as another user - that doesn't seem wrong per se, but I'm probably missing some necessary step. Anyway, the error message I'm getting makes no sense whatsoever from the perspective of the user and gives me no clue of what I am supposed to fix.