Skip to content

Commit

Permalink
feat: Exit if GOOS is not linux
Browse files Browse the repository at this point in the history
* dcgm-exporter supports only linux and if GOOS is not linux exit with message

Signed-off-by: mahendrapaipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed Dec 7, 2023
1 parent 9819189 commit 386ae81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/dcgm-exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ func main() {
Usage: "Use systemd socket activation listeners instead of port listeners (Linux only).",
EnvVars: []string{"DCGM_EXPORTER_SYSTEMD_SOCKET"},
})
} else {
err := "dcgm-exporter is only supported on Linux."
logrus.Fatal(err)
return
}

c.Action = func(c *cli.Context) error {
Expand Down

0 comments on commit 386ae81

Please sign in to comment.