mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 06:03:15 -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"
|
||||
)
|
||||
|
||||
// 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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue