passings args to cue loader to mimick cue eval

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones
2021-12-07 16:10:55 -07:00
parent d2af60d484
commit 5c9965f10a
3 changed files with 36 additions and 20 deletions

View File

@@ -23,13 +23,13 @@ type Plan struct {
source *compiler.Value
}
func Load(ctx context.Context, path, pkg string) (*Plan, error) {
func Load(ctx context.Context, args ...string) (*Plan, error) {
// FIXME: universe vendoring
if err := state.VendorUniverse(ctx, path); err != nil {
if err := state.VendorUniverse(ctx, ""); err != nil {
return nil, err
}
v, err := compiler.Build(path, nil, pkg)
v, err := compiler.Build("", nil, args...)
if err != nil {
return nil, err
}