MCPcopy Create free account
hub / github.com/github/gh-aw / IsAccessibleMode

Function IsAccessibleMode

pkg/console/accessibility.go:15–19  ·  view source on GitHub ↗

IsAccessibleMode detects if accessibility mode should be enabled based on environment variables. Accessibility mode is enabled when: - ACCESSIBLE environment variable is set to any value - TERM environment variable is set to "dumb" - NO_COLOR environment variable is set to any value This function s

()

Source from the content-addressed store, hash-verified

13// - Simplify interactive elements
14// - Use plain text instead of fancy formatting
15func IsAccessibleMode() bool {
16 return os.Getenv("ACCESSIBLE") != "" || //nolint:osgetenvlibrary
17 os.Getenv("TERM") == "dumb" || //nolint:osgetenvlibrary
18 os.Getenv("NO_COLOR") != "" //nolint:osgetenvlibrary
19}

Callers 15

TestIsAccessibleModeFunction · 0.92
confirmChangesMethod · 0.92
selectWorkflowFunction · 0.92
collectInputsWithMapFunction · 0.92
confirmExecutionFunction · 0.92
checkGitRepositoryMethod · 0.92
promptForWorkflowNameMethod · 0.92

Calls 1

GetenvMethod · 0.80

Tested by 3

TestIsAccessibleModeFunction · 0.74
TestIsAccessibleModeFunction · 0.68