Skip to content

Commit eb123db

Browse files
committed
ctr: use transfer service by default
Prior to this commit, `--local=false` had to be explicitly specified to opt-in to the transfer service Signed-off-by: Akihiro Suda <[email protected]>
1 parent 02e0fef commit eb123db

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

cmd/ctr/commands/images/export.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ When '--all-platforms' is given all images in a manifest list must be available.
6161
Name: "all-platforms",
6262
Usage: "Exports content from all platforms",
6363
},
64-
cli.BoolTFlag{
64+
cli.BoolFlag{
6565
Name: "local",
6666
Usage: "Run export locally rather than through transfer API",
6767
},
@@ -93,7 +93,7 @@ When '--all-platforms' is given all images in a manifest list must be available.
9393
}
9494
defer w.Close()
9595

96-
if !context.BoolT("local") {
96+
if !context.Bool("local") {
9797
pf, done := ProgressHandler(ctx, os.Stdout)
9898
defer done()
9999

cmd/ctr/commands/images/import.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
8686
Name: "no-unpack",
8787
Usage: "Skip unpacking the images, cannot be used with --discard-unpacked-layers, false by default",
8888
},
89-
cli.BoolTFlag{
89+
cli.BoolFlag{
9090
Name: "local",
9191
Usage: "Run import locally rather than through transfer API",
9292
},
@@ -113,7 +113,7 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
113113
}
114114
defer cancel()
115115

116-
if !context.BoolT("local") {
116+
if !context.Bool("local") {
117117
var opts []image.StoreOpt
118118
prefix := context.String("base-name")
119119
var overwrite bool

cmd/ctr/commands/images/pull.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ command. As part of this process, we do the following:
7979
Name: "max-concurrent-downloads",
8080
Usage: "Set the max concurrent downloads for each pull",
8181
},
82-
cli.BoolTFlag{
82+
cli.BoolFlag{
8383
Name: "local",
8484
Usage: "Fetch content from local client rather than using transfer service",
8585
},
@@ -98,7 +98,7 @@ command. As part of this process, we do the following:
9898
}
9999
defer cancel()
100100

101-
if !context.BoolT("local") {
101+
if !context.Bool("local") {
102102
ch, err := commands.NewStaticCredentials(ctx, context, ref)
103103
if err != nil {
104104
return err

cmd/ctr/commands/images/push.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var pushCommand = cli.Command{
7171
}, cli.IntFlag{
7272
Name: "max-concurrent-uploaded-layers",
7373
Usage: "Set the max concurrent uploaded layers for each push",
74-
}, cli.BoolTFlag{
74+
}, cli.BoolFlag{
7575
Name: "local",
7676
Usage: "Push content from local client rather than using transfer service",
7777
}, cli.BoolFlag{
@@ -95,7 +95,7 @@ var pushCommand = cli.Command{
9595
}
9696
defer cancel()
9797

98-
if !context.BoolT("local") {
98+
if !context.Bool("local") {
9999
ch, err := commands.NewStaticCredentials(ctx, context, ref)
100100
if err != nil {
101101
return err

cmd/ctr/commands/images/tag.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var tagCommand = cli.Command{
3737
Name: "force",
3838
Usage: "Force target_ref to be created, regardless if it already exists",
3939
},
40-
cli.BoolTFlag{
40+
cli.BoolFlag{
4141
Name: "local",
4242
Usage: "Run tag locally rather than through transfer API",
4343
},
@@ -63,7 +63,7 @@ var tagCommand = cli.Command{
6363
}
6464
defer cancel()
6565

66-
if !context.BoolT("local") {
66+
if !context.Bool("local") {
6767
for _, targetRef := range context.Args()[1:] {
6868
if !context.Bool("skip-reference-check") {
6969
if _, err := reference.ParseAnyReference(targetRef); err != nil {

0 commit comments

Comments
 (0)