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

Copying a bundle with the image-is-bundle-check being false now directs user to use correct flag. #560

Closed
wants to merge 1 commit into from

Conversation

ashpect
Copy link
Contributor

@ashpect ashpect commented Aug 11, 2023

This solves #544 and #559.

Initial Issue

The command

imgpkg pull -b index.docker.io/<user>/<repo>:<tag> --image-is-bundle-check=false -o <location>

successfully runs and will pull it as an image, which is a bit weird because we are trying to pull a bundle using the bundle flag.

Initial Fix

Now running the command throws this error

imgpkg: Error: Expected image flag when wanting to pull a bundle as OCI image (hint: Use -i instead of -b)

Analysis

Screenshot 2023-08-11 at 2 08 10 PM

As seen from the picture , the case when we pass a image link along with the -I flag and the —image-is-bundle-check flag=true also gets passed by and the image is pulled.

What steps did I take ?

  • Removed some redundant variable checking
  • Added checks for both the cases and printed error for the user.

@ashpect ashpect had a problem deploying to TanzuNet Registry Dev e2e August 11, 2023 08:48 — with GitHub Actions Failure
@ashpect ashpect changed the title Copying a bundle with the image-is-bundle-check being false directs user to use correct flag Copying a bundle with the image-is-bundle-check being false now directs user to use correct flag. Aug 11, 2023
@ashpect ashpect had a problem deploying to TanzuNet Registry Dev e2e August 11, 2023 08:53 — with GitHub Actions Failure
@ashpect ashpect had a problem deploying to TanzuNet Registry Dev e2e August 14, 2023 13:08 — with GitHub Actions Failure
@ashpect ashpect had a problem deploying to TanzuNet Registry Dev e2e August 14, 2023 13:08 — with GitHub Actions Failure
Signed-off-by: ashpect <ashishndiitr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant