Merge pull request #4544 from schrej/patch-1

cr: fix checkpoint from image getting skipped
This commit is contained in:
Phil Estes 2020-09-15 20:11:08 -04:00 committed by GitHub
commit 373cbc2a7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,7 @@ func (l *local) Create(ctx context.Context, r *api.CreateTaskRequest, _ ...grpc.
return nil, err
}
// jump get checkpointPath from checkpoint image
if checkpointPath != "" && r.Checkpoint != nil {
if checkpointPath == "" && r.Checkpoint != nil {
checkpointPath, err = ioutil.TempDir(os.Getenv("XDG_RUNTIME_DIR"), "ctrd-checkpoint")
if err != nil {
return nil, err