MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / env_truthy

Function env_truthy

crates/opencode-session/src/instruction.rs:39–44  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

37// ---------------------------------------------------------------------------
38
39fn env_truthy(name: &str) -> bool {
40 match std::env::var(name) {
41 Ok(v) => matches!(v.as_str(), "1" | "true" | "TRUE" | "yes" | "YES"),
42 Err(_) => false,
43 }
44}
45
46fn is_project_config_disabled() -> bool {
47 env_truthy("OPENCODE_DISABLE_PROJECT_CONFIG")

Callers 2

global_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected