Closed bbrowning closed 2 months ago
Testing this a bit more, it appears to only trigger when you use the --config
option. Looking at the code, it looks like the os.MkdirAll
call at https://github.com/jozu-ai/kitops/blob/6267c0d35dcfb34c29f593f3e5bb18eba5a18b5b/pkg/cmd/unpack/unpack.go#L154 only happens when unpacking layers. When I unpack only the config, we're not actually unpacking any layers so we don't make the directory.
@amisevsk FYI. In case you are changing these parts of the code at the moment
Good catch, thanks @bbrowning!
Describe the bug
kit unpack --help
says:-d, --dir string The target directory to unpack components into. This directory will be created if it does not exist
. However, the target directory does have to already exist, at least in my case.To Reproduce
kit unpack remote_host/remote_repo:latest --config -d foo
and you'll see an error trying to write the config file to the non-existent directoryfoo
Try it again after making the directory
foo
and everything works.Version Built from source commit f9ef9ab983e453b96e1b77f06190c4421c19790d (latest as of opening this bug report)