MCPcopy Index your code
hub / github.com/coder/coder / shellBool

Function shellBool

scripts/develop/main.go:1461–1466  ·  view source on GitHub ↗

shellBool returns "1" for true and "0" for false (shell convention).

(b bool)

Source from the content-addressed store, hash-verified

1459
1460// shellBool returns "1" for true and "0" for false (shell convention).
1461func shellBool(b bool) string { //nolint:revive // trivial bool-to-string helper
1462 if b {
1463 return "1"
1464 }
1465 return "0"
1466}
1467
1468func developInCoder() bool {
1469 return os.Getenv("DEVELOP_IN_CODER") == "1" || os.Getenv("CODER_AGENT_URL") != ""

Callers 2

TestShellBoolFunction · 0.85
buildBinaryFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestShellBoolFunction · 0.68