diff --git a/internal/config/config.go b/internal/config/config.go index 3d16db6..263edc2 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -316,7 +316,13 @@ func (c *AppConfig) processLines(lines []string) []string { } if !foundLineLogPath && strings.Contains(line, "logPath =") { if c.Config.LogPath == "" { - lines[i] = `#logPath = ""` + // Check if the line already has a value + matches := strings.Split(line, "=") + if len(matches) > 1 && strings.TrimSpace(matches[1]) != `""` { + lines[i] = line // Preserve the existing line + } else { + lines[i] = `#logPath = ""` + } } else { lines[i] = fmt.Sprintf("logPath = \"%s\"", c.Config.LogPath) }