bake: fix potential context entitlements escape

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-06-06 16:40:18 +02:00
parent c820350b5e
commit d34103b0d9
3 changed files with 110 additions and 1 deletions

View File

@ -20,6 +20,12 @@ func tmpdir(t *testing.T, appliers ...fstest.Applier) string {
type cmdOpt func(*exec.Cmd)
func withEnv(env ...string) cmdOpt {
return func(cmd *exec.Cmd) {
cmd.Env = append(cmd.Env, env...)
}
}
func withArgs(args ...string) cmdOpt {
return func(cmd *exec.Cmd) {
cmd.Args = append(cmd.Args, args...)