add more verbose output support

This commit is contained in:
Daylin Morgan 2024-05-22 10:57:30 -05:00
parent 7e15843425
commit 4150669d29
Signed by: daylin
GPG Key ID: 950D13E9719334AD
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import (
"github.com/briandowns/spinner"
)
// verbose vs debug?
type Oizys struct {
flake string
host string
@ -229,6 +230,10 @@ func (o *Oizys) NixosRebuild(subcmd string, rest ...string) {
o.flake,
}
args = append(args, rest...)
if o.verbose {
args = append(args, "--verbose")
fmt.Println("CMD:", "sudo", strings.Join(args, " "))
}
cmd := exec.Command("sudo", args...)
runCommand(cmd)
}