Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] Install Castor via composer global #210

Closed
thedomeffm opened this issue Dec 23, 2023 · 2 comments · Fixed by #211
Closed

[Documentation] Install Castor via composer global #210

thedomeffm opened this issue Dec 23, 2023 · 2 comments · Fixed by #211

Comments

@thedomeffm
Copy link
Contributor

thedomeffm commented Dec 23, 2023

I wanted to install castor via composer (globally).

The documentation said the package will be available from here:

Then make sure that the Composer global bin directory is in your PATH:
export PATH="$HOME/.composer/vendor/bin:$PATH"

But it did not work.
I saw the stackoverflow article to see the configured composer global path via: composer config --list --global that resulted in:

// other lines...
[home] /home/<user>/.config/composer

So at least in my setup I needed to export PATH="$HOME/.config/composer/vendor/bin:$PATH".

I am not a composer expert, just a "user" so I am not sure if this is just a Linux thing, or did I configured it in the past to be in this path... I don't know.
At least I wanted to share this with you guys, so probably when this is the "new composer standard" we could change it in the docs.

If the strange configuration is just my user error, please bear with me - I'm sorry.

@pyrech
Copy link
Member

pyrech commented Dec 24, 2023

Hello @thedomeffm, thanks for your issue 🙂

You're right, the location of the global path is not that simple. Composer's documentation states that:

By default, it points to C:\Users<user>\AppData\Roaming\Composer on Windows and /Users/< user >/.composer on macOS. On *nix systems that follow the XDG Base Directory Specifications, it points to $XDG_CONFIG_HOME/composer. On other *nix systems, it points to /home/< user >/.composer.

So depending on your Linux distribution, it can either be ~/.config/composer or ~/.composer. I also remember having some issues in the past with this config path. So I think it's ok to add a command line (maybe the one you posted but with a grep to only show the interesting path?) in our documentation to help users add the correct path in the $PATH env var.

Would you mind to submit such a PR? 🙂

@thedomeffm
Copy link
Contributor Author

#211 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants