score-spec / docs

Docs for Score Specification.
https://docs.score.dev/docs/
Apache License 2.0
6 stars 12 forks source link

Install the Score implementation (CLI): Where to find score-compose after installation with Go? #41

Closed Noordsestern closed 1 year ago

Noordsestern commented 1 year ago

System: Linux Mint 21.1 go: 1.20.3 linux/amd64

When using the [installation method with Go](go install -v github.com/score-spec/score-compose/cmd/score-compose@latest ), the installation works, score-compose seems to be downloaded - but it is nowhere to be found. Also score-compose is still an unknown command.

How to execute score-compose after installation with go?

rachfop commented 1 year ago

This is probably based on where you have your PATH environment variable.

When you install a Go package using go install it places the compiled binary in the Go binary directory. Here's how you can find and execute score-compose:

  1. Find the Go binary directory: This is usually $GOPATH/bin or $HOME/go/bin, depending on your Go installation and configuration.

  2. Add the Go binary directory to your PATH: You can do this in your shell session by running:

    export PATH=$PATH:$(go env GOPATH)/bin

    You can add this line to your .bashrc or .zshrc file to make this change permanent.

  3. Verify the installation: Run the following command to check if score-compose is in the expected directory:

    which score-compose

    If everything is set up correctly, this command will print the path to the score-compose binary.

  4. Execute score-compose: You can now run score-compose --version just like any other CLI.