Skip to content

Commit

Permalink
Extra check for nil context
Browse files Browse the repository at this point in the history
Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>
  • Loading branch information
dgannon991 committed Jan 29, 2025
1 parent c846448 commit af409c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions driver/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ func (d *Driver) initializeDockerCli() (command.Cli, error) {
}

func (d *Driver) exec(op *driver.Operation) (driver.OperationResult, error) {
// if no context were provided
if op.CTX == nil {
op.CTX = context.Background()
}

cli, err := d.initializeDockerCli()
if err != nil {
Expand Down
8 changes: 8 additions & 0 deletions imagestore/ocilayout/testdata/artifacts/layout/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
"org.opencontainers.image.ref.name": "docker.io/library/hello-world@sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 525,
"digest": "sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4",
"annotations": {
"org.opencontainers.image.ref.name": "docker.io/library/hello-world@sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 525,
Expand Down

0 comments on commit af409c3

Please sign in to comment.