Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/soci/commands/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
)

const (
standaloneFlag = "standalone"
StandaloneFlag = "standalone"
outputFormatFlag = "format"

outputFormatOCIArchive = "oci-archive"
Expand Down Expand Up @@ -81,7 +81,7 @@ var ConvertCommand = &cli.Command{
internal.PrefetchFlags,
[]cli.Flag{
&cli.BoolFlag{
Name: standaloneFlag,
Name: StandaloneFlag,
Usage: "Run in standalone mode without containerd runtime. In this mode, the command reads an OCI image layout (tar or directory) and writes a converted OCI image layout without requiring a running containerd instance.",
},
&cli.StringFlag{
Expand All @@ -107,7 +107,7 @@ var ConvertCommand = &cli.Command{
return errors.New("destination needs to be specified")
}

if cmd.Bool(standaloneFlag) {
if cmd.Bool(StandaloneFlag) {
return runStandaloneConvert(ctx, cmd, src, dst)
}

Expand Down
4 changes: 4 additions & 0 deletions cmd/soci/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func main() {
commands.RebuildDBCommand,
},
Before: func(ctx context.Context, cmd *cli.Command) (context.Context, error) {
Comment thread
prafgup marked this conversation as resolved.
// Standalone convert doesn't need the snapshotter root path.
if cmd.Command(commands.ConvertCommand.Name).Bool(commands.StandaloneFlag) {
return ctx, nil
}
return ctx, soci.EnsureSnapshotterRootPath(cmd.String(global.RootFlag))
},
}
Expand Down