Merge pull request #1288 from TomChv/fix/fs-naming
This commit is contained in:
@@ -24,8 +24,8 @@ func (t *mkdirTask) Run(ctx context.Context, pctx *plancontext.Context, s solver
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Mode (int)
|
||||
mode, err := v.Lookup("mode").Int64()
|
||||
// Permissions (int)
|
||||
permissions, err := v.Lookup("permissions").Int64()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -58,7 +58,7 @@ func (t *mkdirTask) Run(ctx context.Context, pctx *plancontext.Context, s solver
|
||||
|
||||
// Add Mkdir operation on input llb state
|
||||
outputState := inputState.File(
|
||||
llb.Mkdir(path, fs.FileMode(mode), mkdirOpts...),
|
||||
llb.Mkdir(path, fs.FileMode(permissions), mkdirOpts...),
|
||||
withCustomName(v, "Mkdir %s", path),
|
||||
)
|
||||
|
||||
|
@@ -48,7 +48,7 @@ func (t *writeFileTask) Run(ctx context.Context, pctx *plancontext.Context, s so
|
||||
return nil, err
|
||||
}
|
||||
|
||||
mode, err := v.Lookup("mode").Int64()
|
||||
permissions, err := v.Lookup("permissions").Int64()
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -67,7 +67,7 @@ func (t *writeFileTask) Run(ctx context.Context, pctx *plancontext.Context, s so
|
||||
}
|
||||
|
||||
outputState := inputState.File(
|
||||
llb.Mkfile(path, fs.FileMode(mode), contents),
|
||||
llb.Mkfile(path, fs.FileMode(permissions), contents),
|
||||
withCustomName(v, "WriteFile %s", path),
|
||||
)
|
||||
|
||||
@@ -77,11 +77,11 @@ func (t *writeFileTask) Run(ctx context.Context, pctx *plancontext.Context, s so
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fs := pctx.FS.New(result)
|
||||
outputFS := pctx.FS.New(result)
|
||||
|
||||
output := compiler.NewValue()
|
||||
|
||||
if err := output.FillPath(cue.ParsePath("output"), fs.MarshalCUE()); err != nil {
|
||||
if err := output.FillPath(cue.ParsePath("output"), outputFS.MarshalCUE()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user