From 19387b84187bef5edf437f4a46399843979e955e Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:52:39 -0600 Subject: [PATCH] fix(prompter): rename GH_ACCESSIBLE_PROMPTER --- internal/prompter/prompter.go | 2 +- internal/prompter/speech_synthesizer_friendly_prompter_test.go | 2 +- pkg/cmd/root/help_topic.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/prompter/prompter.go b/internal/prompter/prompter.go index 556fa6f4c..bf5655846 100644 --- a/internal/prompter/prompter.go +++ b/internal/prompter/prompter.go @@ -44,7 +44,7 @@ type Prompter interface { } func New(editorCmd string, stdin ghPrompter.FileReader, stdout ghPrompter.FileWriter, stderr ghPrompter.FileWriter) Prompter { - accessiblePrompterValue, accessiblePrompterIsSet := os.LookupEnv("GH_SPEECH_SYNTHESIZER_FRIENDLY_PROMPTER") + accessiblePrompterValue, accessiblePrompterIsSet := os.LookupEnv("GH_ACCESSIBLE_PROMPTER") falseyValues := []string{"false", "0", "no", ""} if accessiblePrompterIsSet && !slices.Contains(falseyValues, accessiblePrompterValue) { diff --git a/internal/prompter/speech_synthesizer_friendly_prompter_test.go b/internal/prompter/speech_synthesizer_friendly_prompter_test.go index d461bf1e4..20935a566 100644 --- a/internal/prompter/speech_synthesizer_friendly_prompter_test.go +++ b/internal/prompter/speech_synthesizer_friendly_prompter_test.go @@ -56,7 +56,7 @@ func TestSpeechSynthesizerFriendlyPrompter(t *testing.T) { os.Stdout = console.Tty() os.Stderr = console.Tty() - t.Setenv("GH_SPEECH_SYNTHESIZER_FRIENDLY_PROMPTER", "true") + t.Setenv("GH_ACCESSIBLE_PROMPTER", "true") // Using echo as the editor command here because it will immediately exit // and return no input. p := prompter.New("echo", nil, nil, nil) diff --git a/pkg/cmd/root/help_topic.go b/pkg/cmd/root/help_topic.go index e0a1a8535..f7a827dcd 100644 --- a/pkg/cmd/root/help_topic.go +++ b/pkg/cmd/root/help_topic.go @@ -109,7 +109,7 @@ var HelpTopics = []helpTopic{ wrapped on the terminal will be taken as the lesser of the terminal width, this value, or 120 if not specified. This value is used, for example, with %[1]spr view%[1]s subcommand. - %[1]sGH_SPEECH_SYNTHESIZER_FRIENDLY_PROMPTER%[1]s: set to a truthy value to enable prompts that are + %[1]sGH_ACCESSIBLE_PROMPTER%[1]s: set to a truthy value to enable prompts that are more compatible with speech synthesis based screen readers. `, "`"), },