cmd/nix-tool/resolve: build before evaluate
This avoids many problems that come up when resolving on an empty store. All paths are built later on anyway.
This commit is contained in:
parent
3deb8862ba
commit
0956524d0c
@ -13,6 +13,11 @@ func buildAndResolve(ctx nix.Context, name string, installable *string, collecti
|
||||
return err
|
||||
}
|
||||
|
||||
log.Printf("building %q...", *installable)
|
||||
if err := nix.Build(ctx, slices.Values([]string{*installable})); err != nil {
|
||||
return commandHandlerError(fmt.Sprintf("cannot build: %v", err))
|
||||
}
|
||||
|
||||
log.Printf("evaluating %q...", *installable)
|
||||
var installables []string
|
||||
if v, err := nix.EvalInstantiated(ctx, *installable); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user