Misleading error for missing file
amouat opened this issue · 0 comments
amouat commented
If you give the wrong path to an apko.yaml you get a very confusing error e.g:
apko build /wrong/path/apko.yaml test test.tar
ℹ️ | loading config file: /wrong/path/apko.yaml
⚠️ | remote configurations are an experimental feature and subject to change.
Error: failed to load image configuration: unable to fetch remote include from git: failed to clone /wrong/path/apko.yaml: Get "https://wrong/path/info/refs?service=git-upload-pack": dial tcp: lookup wrong: no such host
2024/01/05 14:13:11 error during command execution: failed to load image configuration: unable to fetch remote include from git: failed to clone /wrong/path/apko.yaml: Get "https://wrong/path/info/refs?service=git-upload-pack": dial tcp: lookup wrong: no such host
I would expect something simple like "File not found".
This seems to be caused by a feature that supports remote repos. I think we need to be a little more careful before assuming the user wants a remote repo here:
apko/pkg/build/types/image_configuration.go
Line 108 in 914648f