cmd/cli: normalize log path when sending log

So the correct log file that "ctrld run" process is writing logs to will
be sent to server correctly.
This commit is contained in:
Cuong Manh Le
2024-12-13 14:25:30 +07:00
committed by Cuong Manh Le
parent 221917e80b
commit 89f7874fc6

View File

@@ -122,7 +122,7 @@ func (p *prog) logContent() ([]byte, error) {
if p.cfg.Service.LogPath == "" {
return nil, nil
}
buf, err := os.ReadFile(p.cfg.Service.LogPath)
buf, err := os.ReadFile(normalizeLogFilePath(p.cfg.Service.LogPath))
if err != nil {
return nil, err
}