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