mirror of
https://github.com/linka-cloud/d2vm.git
synced 2025-12-14 15:03:12 +00:00
tests: fix permissions error
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@@ -81,7 +81,7 @@ func (i DockerImage) AsRunScript(w io.Writer) error {
|
||||
}
|
||||
|
||||
func NewImage(ctx context.Context, tag string, imageTmpPath string) (*image, error) {
|
||||
if err := os.MkdirAll(imageTmpPath, perm); err != nil {
|
||||
if err := os.MkdirAll(imageTmpPath, os.ModePerm); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// save the image to a tar file to avoid loading it in memory
|
||||
@@ -110,6 +110,9 @@ type image struct {
|
||||
}
|
||||
|
||||
func (i image) Flatten(ctx context.Context, out string) error {
|
||||
if err := os.MkdirAll(out, os.ModePerm); err != nil {
|
||||
return err
|
||||
}
|
||||
tar := filepath.Join(i.dir, "img.tar")
|
||||
f, err := os.Create(tar)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user