Implemented --no-vendor

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones
2022-02-14 14:26:37 -07:00
parent eee71d0382
commit 071c3bafe1
2 changed files with 8 additions and 3 deletions

View File

@@ -29,14 +29,17 @@ type Config struct {
Args []string
With []string
Target string
Vendor bool
}
func Load(ctx context.Context, cfg Config) (*Plan, error) {
log.Ctx(ctx).Debug().Interface("args", cfg.Args).Msg("loading plan")
// FIXME: vendoring path
if err := pkg.Vendor(ctx, ""); err != nil {
return nil, err
if cfg.Vendor {
// FIXME: vendoring path
if err := pkg.Vendor(ctx, ""); err != nil {
return nil, err
}
}
v, err := compiler.Build("", nil, cfg.Args...)