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

ocm download cli not working like expected #1029

Open
morri-son opened this issue Oct 30, 2024 · 1 comment
Open

ocm download cli not working like expected #1029

morri-son opened this issue Oct 30, 2024 · 1 comment
Labels
area/ipcei Important Project of Common European Interest component/ocm-cli OCM Command Line Interface kind/bugfix Bug lifecycle/stale Nobody worked on this for 6 months (will further age)

Comments

@morri-son
Copy link
Contributor

morri-son commented Oct 30, 2024

What happened:
ocm download cli specified without any parameters, just using the defaults, fails with error message

❯ ocm download cli
updating OCM CLI command at /Users/D032990/go/packages/bin/ocm
Error: error processing "ocm.software/ocmcli": ocm.software/ocmcli: invalid component version reference: repository "ocm.software/ocmcli" is unknown

specifying the standard repo/component another error pops up, saying that my ocm binary in the PATH is no folder, which is correct ;-)

❯ ghcr.io/open-component-model/ocm//ocm.software/ocmcli``` 

updating OCM CLI command at /Users/D032990/go/packages/bin/ocm


/Users/D032990/go/packages/bin/ocm/ocm.software/ocmcli/0.1.0-alpha.2/ocm-architecture=arm64,os=darwin failed: mkdir 
...
tried and throwing errors for all existing versions 0.1.0 to 0.17.0 of the cli
...
/Users/D032990/go/packages/bin/ocm/ocm.software/ocmcli/0.17.0/ocm-architecture=arm64,os=darwin failed: mkdir /Users/D032990/go/packages/bin/ocm: not a directory
Error: downloading resources: {mkdir /Users/D032990/go/packages/bin/ocm: not a directory, mkdir /Users/D032990/go/packages/bin/ocm: not a directory, mkdir /Users/D032990/go/packages/bin/ocm: not a directory, mkdir /Users/D032990/go/packages/bin/ocm: not a directory}

Trying to use the -c to give a version constraint, fails with the exact same error. Since it is not described what format the constraint needs to have and no example is given.

Specifying an output folder via option -O at least download the cli, but does this for ALL versions, not the one specified in the constraint (by the way, why is the option called -c and not simply -v as it is about the version of the cli to be downloaded???)

❯ ocm download cli -c "0.17.0" -O /tmp ghcr.io/open-component-model/ocm//ocm.software/ocmcli
/tmp/ocm/ocm.software/ocmcli/0.1.0-alpha.2/ocm-architecture=arm64,os=darwin: 52842546 byte(s) written
/tmp/ocm/ocm.software/ocmcli/0.1.0-dev/ocm-architecture=arm64,os=darwin: 52842546 byte(s) written
/tmp/ocm/ocm.software/ocmcli/0.3.0-rc.2/ocm-architecture=arm64,os=darwin: 64282866 byte(s) written
/tmp/ocm/ocm.software/ocmcli/0.9.0/ocm-architecture=arm64,os=darwin: 82504770 byte(s) written
/tmp/ocm/ocm.software/ocmcli/0.10.0/ocm-architecture=arm64,os=darwin: 82557170 byte(s) written
/tmp/ocm/ocm.software/ocmcli/0.11.0/ocm-architecture=arm64,os=darwin: 83029666 byte(s) written
...

What you expected to happen:
Download the CLI like described in the description and replace the existing version in the PATH if it exists and no option -O has been given.

Download an OCM CLI executable. By default, the standard publishing component and repository is used.

  The option «-O» is used to declare the output destination.
  The default location is the location of the «ocm» executable in
  the actual PATH.

How to reproduce it (as minimally and precisely as possible):
Just try a ocm download cli on the command line.

Copy link
Contributor

github-actions bot commented Feb 6, 2025

This issue was marked as stale because it has not had recent activity.

@github-actions github-actions bot added the lifecycle/stale Nobody worked on this for 6 months (will further age) label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipcei Important Project of Common European Interest component/ocm-cli OCM Command Line Interface kind/bugfix Bug lifecycle/stale Nobody worked on this for 6 months (will further age)
Projects
Status: 🆕 ToDo
Development

No branches or pull requests

1 participant