Skip to content

fix(cli): --watch normalisation with=true #4132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

mxschmitt
Copy link

@mxschmitt mxschmitt commented Apr 8, 2025

This aligns it with how the internal CLI parser accepts --watch=true which was implemented in ce04765.

Before --watch=true was not correctly identified as "Watch Mode" and disabled the GC as a drive by. This caused memory leaks.

Resolves #4131

@@ -300,7 +300,7 @@ func main() {
for _, arg := range osArgs {
if !strings.HasPrefix(arg, "-") {
nonFlagCount++
} else if arg == "--serve" || arg == "--watch" || strings.HasPrefix(arg, "--serve=") {
} else if arg == "--watch" || strings.HasPrefix(arg, "--watch=") || arg == "--serve" || strings.HasPrefix(arg, "--serve=") {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems inaccurate for =false options (it already was for serve, now also for watch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Memory Leak with watch mode --watch=true
2 participants