Skip to content

Commit a26646e

Browse files
committed
linux: accept unmask paths as glob values
That is the same configuration used already by Podman. Signed-off-by: Giuseppe Scrivano <[email protected]>
1 parent 573f694 commit a26646e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
-13 Bytes
Binary file not shown.

run_linux.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -1241,9 +1241,16 @@ func setupMaskedPaths(g *generate.Generator, opts *define.CommonBuildOptions) er
12411241
return err
12421242
}
12431243

1244+
maskedPaths:
12441245
for _, mp := range append(maskedPaths, opts.Masks...) {
1245-
if slices.Contains(opts.Unmasks, mp) {
1246-
continue
1246+
for _, unmask := range opts.Unmasks {
1247+
match, err := filepath.Match(m1, mask)
1248+
if err != nil {
1249+
return err
1250+
}
1251+
if match {
1252+
continue maskedPaths
1253+
}
12471254
}
12481255
g.AddLinuxMaskedPaths(mp)
12491256
}

0 commit comments

Comments
 (0)