Skip to content

Commit 9ba004c

Browse files
committed
exporter: remove non dist options from tar exporter
This option looks like a mistake added in 45fc3ed. These options aren't ever used, so we don't need to parse them, we can just silently discard them. Signed-off-by: Justin Chadwell <[email protected]>
1 parent b2ff17c commit 9ba004c

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

exporter/tar/export.go

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package local
33
import (
44
"context"
55
"os"
6-
"strconv"
76
"strings"
87
"time"
98

@@ -20,13 +19,6 @@ import (
2019
fstypes "github.com/tonistiigi/fsutil/types"
2120
)
2221

23-
const (
24-
// preferNondistLayersKey is an exporter option which can be used to mark a layer as non-distributable if the layer reference was
25-
// already found to use a non-distributable media type.
26-
// When this option is not set, the exporter will change the media type of the layer to a distributable one.
27-
preferNondistLayersKey = "prefer-nondist-layers"
28-
)
29-
3022
type Opt struct {
3123
SessionManager *session.Manager
3224
}
@@ -47,25 +39,14 @@ func (e *localExporter) Resolve(ctx context.Context, opt map[string]string) (exp
4739
if err != nil {
4840
return nil, err
4941
}
50-
51-
for k, v := range opt {
52-
switch k {
53-
case preferNondistLayersKey:
54-
b, err := strconv.ParseBool(v)
55-
if err != nil {
56-
return nil, errors.Wrapf(err, "non-bool value for %s: %s", preferNondistLayersKey, v)
57-
}
58-
li.preferNonDist = b
59-
}
60-
}
42+
_ = opt
6143

6244
return li, nil
6345
}
6446

6547
type localExporterInstance struct {
6648
*localExporter
67-
opts local.CreateFSOpts
68-
preferNonDist bool
49+
opts local.CreateFSOpts
6950
}
7051

7152
func (e *localExporterInstance) Name() string {

0 commit comments

Comments
 (0)