cmd/nix-tool: improve message formatting
This commit is contained in:
parent
9a210d9a7c
commit
3deb8862ba
@ -79,12 +79,12 @@ func main() {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("signing collected paths")
|
log.Println("signing collected paths...")
|
||||||
if err := nix.Sign(ctx, flagCacheKeyPath, slices.Values(collective)); err != nil {
|
if err := nix.Sign(ctx, flagCacheKeyPath, slices.Values(collective)); err != nil {
|
||||||
return commandHandlerError(fmt.Sprintf("cannot sign: %v", err))
|
return commandHandlerError(fmt.Sprintf("cannot sign: %v", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("copying to binary cache")
|
log.Println("copying to binary cache...")
|
||||||
if err := nix.Copy(ctx, flagCacheKeyPath, &nix.BinaryCache{
|
if err := nix.Copy(ctx, flagCacheKeyPath, &nix.BinaryCache{
|
||||||
Compression: flagCacheComp,
|
Compression: flagCacheComp,
|
||||||
ParallelCompression: flagCachePComp,
|
ParallelCompression: flagCachePComp,
|
||||||
@ -143,12 +143,12 @@ func main() {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("initialising evaluator")
|
log.Println("initialising evaluator...")
|
||||||
var collective []string
|
var collective []string
|
||||||
if eval, err := nix.NewInstantiatedEvaluator(ctx, installable); err != nil {
|
if eval, err := nix.NewInstantiatedEvaluator(ctx, installable); err != nil {
|
||||||
return commandHandlerError(fmt.Sprintf("cannot initialise evaluator: %v", err))
|
return commandHandlerError(fmt.Sprintf("cannot initialise evaluator: %v", err))
|
||||||
} else {
|
} else {
|
||||||
log.Println("collecting paths")
|
log.Println("collecting paths...")
|
||||||
collective = slices.Collect(eval.Instantiated())
|
collective = slices.Collect(eval.Instantiated())
|
||||||
if err := eval.Err(); err != nil {
|
if err := eval.Err(); err != nil {
|
||||||
return commandHandlerError(fmt.Sprintf("cannot collect: %v", err))
|
return commandHandlerError(fmt.Sprintf("cannot collect: %v", err))
|
||||||
|
@ -13,7 +13,7 @@ func buildAndResolve(ctx nix.Context, name string, installable *string, collecti
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("evaluating %s", *installable)
|
log.Printf("evaluating %q...", *installable)
|
||||||
var installables []string
|
var installables []string
|
||||||
if v, err := nix.EvalInstantiated(ctx, *installable); err != nil {
|
if v, err := nix.EvalInstantiated(ctx, *installable); err != nil {
|
||||||
return commandHandlerError(fmt.Sprintf("cannot evaluate: %v", err))
|
return commandHandlerError(fmt.Sprintf("cannot evaluate: %v", err))
|
||||||
@ -21,12 +21,12 @@ func buildAndResolve(ctx nix.Context, name string, installable *string, collecti
|
|||||||
installables = v
|
installables = v
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("building instantiated derivations")
|
log.Println("building instantiated derivations...")
|
||||||
if err := nix.Build(ctx, slices.Values(installables)); err != nil {
|
if err := nix.Build(ctx, slices.Values(installables)); err != nil {
|
||||||
return commandHandlerError(fmt.Sprintf("cannot build: %v", err))
|
return commandHandlerError(fmt.Sprintf("cannot build: %v", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("collecting store paths")
|
log.Println("collecting store paths...")
|
||||||
if derivations, err := nix.DerivationShow(ctx, slices.Values(installables)); err != nil {
|
if derivations, err := nix.DerivationShow(ctx, slices.Values(installables)); err != nil {
|
||||||
return commandHandlerError(fmt.Sprintf("cannot get derivations: %v", err))
|
return commandHandlerError(fmt.Sprintf("cannot get derivations: %v", err))
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user