mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -06:00
add more verbose output support
This commit is contained in:
parent
7e15843425
commit
4150669d29
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,7 @@ import (
|
||||||
"github.com/briandowns/spinner"
|
"github.com/briandowns/spinner"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// verbose vs debug?
|
||||||
type Oizys struct {
|
type Oizys struct {
|
||||||
flake string
|
flake string
|
||||||
host string
|
host string
|
||||||
|
@ -229,6 +230,10 @@ func (o *Oizys) NixosRebuild(subcmd string, rest ...string) {
|
||||||
o.flake,
|
o.flake,
|
||||||
}
|
}
|
||||||
args = append(args, rest...)
|
args = append(args, rest...)
|
||||||
|
if o.verbose {
|
||||||
|
args = append(args, "--verbose")
|
||||||
|
fmt.Println("CMD:", "sudo", strings.Join(args, " "))
|
||||||
|
}
|
||||||
cmd := exec.Command("sudo", args...)
|
cmd := exec.Command("sudo", args...)
|
||||||
runCommand(cmd)
|
runCommand(cmd)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue