mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-19 03:11:17 +02:00
Fixing logic for Copy command. The problem was not that tar files were being unpacked in wrong order. The problem was that the COPY command requires the FS to be unpacked before it does its work.
This commit is contained in:
+2
-2
@@ -192,8 +192,8 @@ func extractFile(dest string, hdr *tar.Header, tr io.Reader) error {
|
||||
// or a file was copied over a directory prior to now
|
||||
fi, err := os.Stat(dir)
|
||||
if os.IsNotExist(err) || !fi.IsDir() {
|
||||
logrus.Debugf("base %s for file %s does not exist. Creating.", base, path)
|
||||
os.RemoveAll(dir)
|
||||
logrus.Infof("base %s for file %s does not exist. Creating.", base, path)
|
||||
//os.RemoveAll(dir)
|
||||
if err := os.MkdirAll(dir, 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user