mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-29 01:18:48 +02:00
cmd/cli: handle ipc warning message more precisely
If the socket file does not exist, it means that "ctrld start" was never run. In this case, the warning message should not be printed to avoid needless confusion.
This commit is contained in:
+3
-1
@@ -227,7 +227,9 @@ func run(appCallback *AppCallback, stopCh chan struct{}) {
|
||||
consoleWriter.Out = io.MultiWriter(os.Stdout, lc)
|
||||
p.logConn = lc
|
||||
} else {
|
||||
mainLog.Load().Warn().Err(err).Msgf("unable to create log ipc connection")
|
||||
if !errors.Is(err, os.ErrNotExist) {
|
||||
mainLog.Load().Warn().Err(err).Msg("unable to create log ipc connection")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mainLog.Load().Warn().Err(err).Msgf("unable to resolve socket address: %s", sockPath)
|
||||
|
||||
Reference in New Issue
Block a user