Implemented --no-vendor
Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
parent
eee71d0382
commit
071c3bafe1
@ -146,6 +146,7 @@ func europaUp(ctx context.Context, cl *client.Client, args ...string) error {
|
|||||||
Args: args,
|
Args: args,
|
||||||
With: viper.GetStringSlice("with"),
|
With: viper.GetStringSlice("with"),
|
||||||
Target: viper.GetString("target"),
|
Target: viper.GetString("target"),
|
||||||
|
Vendor: !viper.GetBool("no-vendor"),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
lg.Fatal().Err(err).Msg("failed to load plan")
|
lg.Fatal().Err(err).Msg("failed to load plan")
|
||||||
@ -226,6 +227,7 @@ func init() {
|
|||||||
upCmd.Flags().String("output", "", "Write computed output. Prints on stdout if set to-")
|
upCmd.Flags().String("output", "", "Write computed output. Prints on stdout if set to-")
|
||||||
upCmd.Flags().StringArrayP("with", "w", []string{}, "")
|
upCmd.Flags().StringArrayP("with", "w", []string{}, "")
|
||||||
upCmd.Flags().StringP("target", "t", "", "Run a single target of the DAG (for debugging only)")
|
upCmd.Flags().StringP("target", "t", "", "Run a single target of the DAG (for debugging only)")
|
||||||
|
upCmd.Flags().Bool("no-vendor", false, "Force up, disable inputs check")
|
||||||
|
|
||||||
if err := viper.BindPFlags(upCmd.Flags()); err != nil {
|
if err := viper.BindPFlags(upCmd.Flags()); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -29,14 +29,17 @@ type Config struct {
|
|||||||
Args []string
|
Args []string
|
||||||
With []string
|
With []string
|
||||||
Target string
|
Target string
|
||||||
|
Vendor bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func Load(ctx context.Context, cfg Config) (*Plan, error) {
|
func Load(ctx context.Context, cfg Config) (*Plan, error) {
|
||||||
log.Ctx(ctx).Debug().Interface("args", cfg.Args).Msg("loading plan")
|
log.Ctx(ctx).Debug().Interface("args", cfg.Args).Msg("loading plan")
|
||||||
|
|
||||||
// FIXME: vendoring path
|
if cfg.Vendor {
|
||||||
if err := pkg.Vendor(ctx, ""); err != nil {
|
// FIXME: vendoring path
|
||||||
return nil, err
|
if err := pkg.Vendor(ctx, ""); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
v, err := compiler.Build("", nil, cfg.Args...)
|
v, err := compiler.Build("", nil, cfg.Args...)
|
||||||
|
Reference in New Issue
Block a user