diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bfff36ff0..33ac70a17 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - repo: https://github.com/golangci/golangci-lint - rev: v1.59.1 + rev: v1.60.3 hooks: - id: golangci-lint - repo: https://github.com/compilerla/conventional-pre-commit diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 450e713b2..b21114919 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -85,7 +85,7 @@ func (d ProfileFlags) AfterApply() error { type HeadlessFlag bool -func (f *HeadlessFlag) BeforeApply() error { +func (f *HeadlessFlag) AfterApply() error { if os.Getenv("DISPLAY") == "" && !*f { slog.Warn("DISPLAY not set, running in headless mode by default (specify --terminal to suppress this warning).") diff --git a/main.go b/main.go index add5563bb..97a5b03df 100644 --- a/main.go +++ b/main.go @@ -25,7 +25,7 @@ var CLI struct { Version cli.VersionCmd `cmd:"" help:"Show the Go Hass Agent version."` Upgrade cli.UpgradeCmd `cmd:"" help:"Attempt to upgrade from previous version."` Profile cli.ProfileFlags `help:"Enable profiling."` - Headless *cli.HeadlessFlag `help:"Run without a GUI." default:"false"` + Headless *cli.HeadlessFlag `name:"terminal" help:"Run without a GUI." default:"false"` AppID string `name:"appid" default:"${defaultAppID}" help:"Specify a custom app id (for debugging)."` LogLevel string `name:"log-level" enum:"info,debug,trace" default:"info" help:"Set logging level."` Config cli.ConfigCmd `cmd:"" help:"Configure Go Hass Agent."`