Don't use "HEADLESS" environment variable for running tests (#5064)

It is a bit generic, it seems that users sometimes set it for other
reasons (see
https://github.com/jesseduffield/lazygit/issues/5030#issuecomment-3541000735),
and then they are confused why they don't see anything. Use a more
specific name instead.
This commit is contained in:
Stefan Haller
2025-11-28 12:09:17 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -61,5 +61,5 @@ func (gui *Gui) handleTestMode() {
} }
func Headless() bool { func Headless() bool {
return os.Getenv("HEADLESS") != "" return os.Getenv("LAZYGIT_HEADLESS") != ""
} }
+1 -1
View File
@@ -65,7 +65,7 @@ func TestIntegration(t *testing.T) {
func runCmdHeadless(cmd *exec.Cmd) (int, error) { func runCmdHeadless(cmd *exec.Cmd) (int, error) {
cmd.Env = append( cmd.Env = append(
cmd.Env, cmd.Env,
"HEADLESS=true", "LAZYGIT_HEADLESS=true",
"TERM=xterm", "TERM=xterm",
) )