summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd/checkpoint.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/cmd/checkpoint.go')
-rw-r--r--runsc/cmd/checkpoint.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/runsc/cmd/checkpoint.go b/runsc/cmd/checkpoint.go
index e5fc7bdc4..a28eb0f02 100644
--- a/runsc/cmd/checkpoint.go
+++ b/runsc/cmd/checkpoint.go
@@ -81,6 +81,10 @@ func (c *Checkpoint) Execute(_ context.Context, f *flag.FlagSet, args ...interfa
Fatalf("image-path flag must be provided")
}
+ if err := os.MkdirAll(c.imagePath, 0755); err != nil {
+ Fatalf("error making directories at path provided: %v", err)
+ }
+
fullImagePath := filepath.Join(c.imagePath, checkpointFileName)
// Create the image file and open for writing.