Skip to content

Commit

Permalink
Daemon: Remove tray application message when daemon not running in wi…
Browse files Browse the repository at this point in the history
…ndows

In windows now daemon can be started as part of setup so now this
message around tray application doesn't make sense. Generic daemon
not running message is good enough for windows also like it is for other
platforms.
  • Loading branch information
praveenkumar committed Apr 22, 2022
1 parent cb409b4 commit 0a7df3b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
4 changes: 0 additions & 4 deletions cmd/crc/cmd/daemon_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,5 @@ func checkIfDaemonIsRunning() (bool, error) {
return checkDaemonVersion()
}

func daemonNotRunningMessage() string {
return genericDaemonNotRunningMessage
}

func startupDone() {
}
4 changes: 0 additions & 4 deletions cmd/crc/cmd/daemon_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ func httpListener() (net.Listener, error) {
return ln, nil
}

func daemonNotRunningMessage() string {
return genericDaemonNotRunningMessage
}

func startupDone() {
_, _ = daemon.SdNotify(false, daemon.SdNotifyReady)
}
8 changes: 0 additions & 8 deletions cmd/crc/cmd/daemon_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/Microsoft/go-winio"
"github.com/code-ready/crc/pkg/crc/constants"
"github.com/code-ready/crc/pkg/crc/logging"
crcversion "github.com/code-ready/crc/pkg/crc/version"
"github.com/containers/gvisor-tap-vsock/pkg/transport"
)

Expand Down Expand Up @@ -36,12 +35,5 @@ func checkIfDaemonIsRunning() (bool, error) {
return checkDaemonVersion()
}

func daemonNotRunningMessage() string {
if crcversion.IsInstaller() {
return "Is CRC tray application running? Cannot reach daemon API"
}
return genericDaemonNotRunningMessage
}

func startupDone() {
}
2 changes: 1 addition & 1 deletion cmd/crc/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func checkDaemonStarted() error {
daemonClient := daemonclient.New()
version, err := daemonClient.APIClient.Version()
if err != nil {
return pkgerrors.Wrap(err, daemonNotRunningMessage())
return pkgerrors.Wrap(err, genericDaemonNotRunningMessage)
}
if version.CrcVersion != crcversion.GetCRCVersion() {
return fmt.Errorf("The executable version (%s) doesn't match the daemon version (%s)", crcversion.GetCRCVersion(), version.CrcVersion)
Expand Down

0 comments on commit 0a7df3b

Please sign in to comment.