on main help sign in
fix(posthog): correct bool prop name for non-interactive mode (#1771)

Co-authored-by: Christian Rocha <christian@rocha.is>

commitca21111b7672c775ddfab566063c2b9ad044dee3 authorAndrey Nering <andreynering@users.noreply.github.com> dateMon 5 Jan 2026, 21:04 (9 months ago) parentbf39639
2 files changed+6−4
internal/cmd/run.go+1−1 internal/event/event.go+5−3
internal/cmd/run.go+1−1
@@ -59,7 +59,7 @@ crush run --quiet "Generate a README for this project"
5959 return fmt.Errorf("no prompt provided")
6060 }
6161
62− event.SetInteractive(true)
62+ event.SetNonInteractive(true)
6363 event.AppInitialized()
6464
6565 return app.RunNonInteractive(ctx, os.Stdout, prompt, quiet)
internal/event/event.go+5−3
@@ -15,6 +15,8 @@ import (
1515const (
1616 endpoint = "https://data.charm.land"
1717 key = "phc_4zt4VgDWLqbYnJYEwLRxFoaTL2noNrQij0C6E8k3I0V"
18+
19+ nonInteractiveEvenName = "NonInteractive"
1820)
1921
2022var (
@@ -27,11 +29,11 @@ var (
2729 Set("SHELL", filepath.Base(os.Getenv("SHELL"))).
2830 Set("Version", version.Version).
2931 Set("GoVersion", runtime.Version()).
30− Set("Interactive", false)
32+ Set(nonInteractiveEvenName, false)
3133)
3234
33−func SetInteractive(interactive bool) {
34− baseProps = baseProps.Set("Interactive", interactive)
35+func SetNonInteractive(nonInteractive bool) {
36+ baseProps = baseProps.Set(nonInteractiveEvenName, nonInteractive)
3537}
3638
3739func Init() {