File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,7 +213,8 @@ func hasFile(path string) bool {
213213type palette struct { on bool }
214214
215215func statusPalette () palette {
216- if os .Getenv ("NO_COLOR" ) != "" {
216+ // NO_COLOR opts out when present, regardless of value (https://no-color.org).
217+ if _ , ok := os .LookupEnv ("NO_COLOR" ); ok {
217218 return palette {on : false }
218219 }
219220 info , err := os .Stdout .Stat ()
Original file line number Diff line number Diff line change @@ -36,7 +36,13 @@ var openInBrowser = func(url string) error {
3636 default :
3737 cmd = exec .Command ("xdg-open" , url )
3838 }
39- return cmd .Start ()
39+ if err := cmd .Start (); err != nil {
40+ return err
41+ }
42+ // Reap the short-lived launcher (open/xdg-open/start) so it does not linger
43+ // as a zombie for the lifetime of the foreground `hk serve` session.
44+ go func () { _ = cmd .Wait () }()
45+ return nil
4046}
4147
4248const hkInstallHint = `HarnessKit (hk) not found on PATH.
You can’t perform that action at this time.
0 commit comments