diff --git a/pkg/accessibility/accessibility.go b/pkg/accessibility/accessibility.go index f97bd53..e50a478 100644 --- a/pkg/accessibility/accessibility.go +++ b/pkg/accessibility/accessibility.go @@ -6,7 +6,11 @@ import ( "github.com/cli/go-gh/v2/pkg/config" ) -const ACCESSIBILITY_ENV = "ACCESSIBILITY" +// ACCESSIBILITY_ENV is the name of the environment variable that can be used to enable +// accessibility features. If the value is empty, "0", or "false", the accessibility +// features are disabled. Any other value enables the accessibility features. Note that +// this environment variable supercedes the configuration file's accessible setting. +const ACCESSIBILITY_ENV = "GH_ACCESSIBILE" // IsEnabled returns true if accessibility features are enabled via the ACCESSIBILITY // environment variable or the configuration file. diff --git a/pkg/accessibility/accessibility_test.go b/pkg/accessibility/accessibility_test.go index 55470e6..a00a370 100644 --- a/pkg/accessibility/accessibility_test.go +++ b/pkg/accessibility/accessibility_test.go @@ -34,7 +34,7 @@ func TestIsEnabled(t *testing.T) { }, { name: "When the accessibility configuration is unset and the ACCESSIBLE env var returns 'false', it should return false", - envVarValue: "0", + envVarValue: "false", cfgStr: "", wantOut: false, }, @@ -58,7 +58,7 @@ func TestIsEnabled(t *testing.T) { }, { name: "When the accessibility configuration is set to enabled and the env var is set to '0', it should return false", - envVarValue: "false", + envVarValue: "0", cfgStr: accessibilityEnabledConfig(), wantOut: false, },