Skip to content

Commit

Permalink
Get descriptors a little later
Browse files Browse the repository at this point in the history
  • Loading branch information
gastrodon committed Aug 17, 2024
1 parent f1dbe14 commit e049f27
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ func run(ctx *cli.Context) error {
}

filename := path.Base(ctx.String("chdir"))
descriptors, evalCtx, err := configure.Literal(filename, literal)
if err != nil {
return err
}

pluginBlocks, diags := configure.ParsePluginsDesc(filename, literal)
if diags.HasErrors() {
return diags
Expand All @@ -75,6 +70,11 @@ func run(ctx *cli.Context) error {
return fmt.Errorf("target required")
}

descriptors, evalCtx, err := configure.Literal(filename, literal)
if err != nil {
return err
}

target := ctx.Args().First()
descriptor, ok := descriptors[target]
if !ok {
Expand Down

0 comments on commit e049f27

Please sign in to comment.