❄ Personal NixOS Flake Manager
nixos home-manager go nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(rui): use lookup paths

Fuwn 368733e1 92a86b59

+6 -7
+6 -7
rui.go
··· 89 89 }, 90 90 }, 91 91 Action: func(c *cli.Context) error { 92 - _, err := exec.LookPath("nh") 92 + nh, err := exec.LookPath("nh") 93 93 extraArgs := []string{} 94 94 95 95 if err := Notify("Queued home switch"); err != nil { ··· 101 101 } 102 102 103 103 if err == nil && !c.Bool("force-home-manager") { 104 - err = Command("nh", append([]string{"home", "switch", "--"}, 104 + err = Command(nh, append([]string{"home", "switch", "--"}, 105 105 extraArgs...)...) 106 106 } else { 107 107 user := c.String("user") ··· 166 166 }, 167 167 }, 168 168 Action: func(c *cli.Context) error { 169 - _, err := exec.LookPath("nh") 169 + nh, err := exec.LookPath("nh") 170 170 171 171 if err := Notify("Queued OS switch"); err != nil { 172 172 return err 173 173 } 174 174 175 175 if err == nil && !c.Bool("force-nixos-rebuild") { 176 - err = Command("nh", "os", "switch") 176 + err = Command(nh, "os", "switch") 177 177 } else { 178 - _, err = exec.LookPath("doas") 179 178 escalator := "sudo" 180 179 181 - if err == nil { 182 - escalator = "doas" 180 + if doas, err := exec.LookPath("doas"); err != nil { 181 + escalator = doas 183 182 } 184 183 185 184 hostname := c.String("hostname")