instantiated: connect stdout
This commit is contained in:
parent
1f01e82714
commit
8c390f6745
@ -11,6 +11,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
Stdout io.Writer = nil
|
||||
)
|
||||
|
||||
const (
|
||||
instantiatedPrefix = "instantiated '"
|
||||
instantiatedSeparator = " -> "
|
||||
@ -104,6 +108,8 @@ func EvalInstantiated(ctx context.Context, installable string) ([]string, error)
|
||||
|
||||
cmd := exec.CommandContext(c,
|
||||
"nix", "build", installable,
|
||||
// since flakes are supposedly experimental
|
||||
"--extra-experimental-features", "nix-command flakes",
|
||||
// 'instantiated' messages are only emitted when actually evaluating something
|
||||
"--option", "eval-cache", "false",
|
||||
// do not actually build anything
|
||||
@ -112,6 +118,7 @@ func EvalInstantiated(ctx context.Context, installable string) ([]string, error)
|
||||
"-Lvvv",
|
||||
)
|
||||
|
||||
cmd.Stdout = Stdout
|
||||
stderr, err := cmd.StderrPipe()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user