mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -06:00
actually set the correct ttl
This commit is contained in:
parent
ec68314102
commit
a04b4fd4c6
1 changed files with 5 additions and 2 deletions
|
@ -229,7 +229,7 @@ func Dry(verbose bool, minimal bool, rest ...string) {
|
||||||
cmd := exec.Command("nix", "build", "--dry-run")
|
cmd := exec.Command("nix", "build", "--dry-run")
|
||||||
cmd.Args = append(cmd.Args, rest...)
|
cmd.Args = append(cmd.Args, rest...)
|
||||||
if o.resetCache {
|
if o.resetCache {
|
||||||
cmd.Args = append(cmd.Args, "--narinfo-cache-positive-ttl", "0")
|
cmd.Args = append(cmd.Args, "--narinfo-cache-negative-ttl", "0")
|
||||||
}
|
}
|
||||||
var spinnerMsg string
|
var spinnerMsg string
|
||||||
if minimal {
|
if minimal {
|
||||||
|
@ -285,7 +285,7 @@ func NixBuild(nom bool, minimal bool, rest ...string) {
|
||||||
}
|
}
|
||||||
cmd := exec.Command(cmdName, "build")
|
cmd := exec.Command(cmdName, "build")
|
||||||
if o.resetCache {
|
if o.resetCache {
|
||||||
cmd.Args = append(cmd.Args, "--narinfo-cache-positive-ttl", "0")
|
cmd.Args = append(cmd.Args, "--narinfo-cache-negative-ttl", "0")
|
||||||
}
|
}
|
||||||
if minimal {
|
if minimal {
|
||||||
log.Debug("populating args with derivations not already built")
|
log.Debug("populating args with derivations not already built")
|
||||||
|
@ -388,6 +388,9 @@ func filter[T any](ss []T, test func(T) bool) (ret []T) {
|
||||||
|
|
||||||
func toBuildNixosConfiguration() []string {
|
func toBuildNixosConfiguration() []string {
|
||||||
systemCmd := exec.Command("nix", "build", o.nixosConfigAttr(), "--dry-run")
|
systemCmd := exec.Command("nix", "build", o.nixosConfigAttr(), "--dry-run")
|
||||||
|
if o.resetCache {
|
||||||
|
systemCmd.Args = append(systemCmd.Args, "--narinfo-cache-negative-ttl", "0")
|
||||||
|
}
|
||||||
result, err := cmdOutputWithSpinner(
|
result, err := cmdOutputWithSpinner(
|
||||||
systemCmd,
|
systemCmd,
|
||||||
fmt.Sprintf("running dry build for: %s", o.nixosConfigAttr()),
|
fmt.Sprintf("running dry build for: %s", o.nixosConfigAttr()),
|
||||||
|
|
Loading…
Reference in a new issue