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

BUGFIX: passing a --oci-layout-path value with uppercase letters caused ko to fail #1217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

inteon
Copy link

@inteon inteon commented Jan 19, 2024

This can be reproduces very easily:

$ ko build . --oci-layout-path=AAAAA --push=false
2024/01/19 13:21:23 Using base golang:latest@sha256:5f5d61dcb58900bc57b230431b6367c900f9982b583adcabf9fa93fd0aa5544a for github.com/google/ko
2024/01/19 13:21:24 Using build config ko for github.com/google/ko
2024/01/19 13:21:24 Building github.com/google/ko for linux/amd64
2024/01/19 13:21:25 Saving ko://github.com/google/ko
2024/01/19 13:21:25 Saved ko://github.com/google/ko
Error: failed to publish images: error publishing ko://github.com/google/ko: repository can only contain the characters `abcdefghijklmnopqrstuvwxyz0123456789_-./`: AAAAA
exit status 1

On OSX especially this causes issues when you provide an absolute path.

This PR implements a very basic fix, printing the lowercase version of the path instead of the original path.

…d ko to fail

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@inteon
Copy link
Author

inteon commented Jan 19, 2024

PTAL @imjasonh @cpanato

@cpanato cpanato requested a review from imjasonh January 19, 2024 13:36
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@inteon inteon changed the title BUGFIX: passing a --oci-layout-path value with upercase letters caused ko to fail BUGFIX: passing a --oci-layout-path value with uppercase letters caused ko to fail Mar 12, 2024
@inteon
Copy link
Author

inteon commented Mar 12, 2024

@imjasonh WDYT?

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 this pull request may close these issues.

None yet

2 participants