fleet/pkg/open/open_windows.go
Lucas Manuel Rodriguez c82c580716
Orbit: Add Fleet Desktop support to Windows (#4873)
* Orbit: Add Fleet Desktop support to Windows

* Rename workflow, fix linux build

* Do not compile systray on linux

* nolint on unused

* Fix lint properly

* nolint both checkers

* Fix monitor logic in desktopRunner

* Fix interrupt and execute order
2022-04-01 17:28:51 -03:00

17 lines
308 B
Go

package open
import (
"os/exec"
"syscall"
)
func browser(url string) error {
cmd := exec.Command("cmd", "/c", "start", url)
cmd.SysProcAttr = &syscall.SysProcAttr{
// HideWindow avoids a brief cmd console from opening
// before the browser opens the URL.
HideWindow: true,
}
return cmd.Run()
}