flag.ts 303 B

123456789
  1. export namespace Flag {
  2. export const OPENCODE_AUTO_SHARE = truthy("OPENCODE_AUTO_SHARE")
  3. export const OPENCODE_DISABLE_WATCHER = truthy("OPENCODE_DISABLE_WATCHER")
  4. function truthy(key: string) {
  5. const value = process.env[key]?.toLowerCase()
  6. return value === "true" || value === "1"
  7. }
  8. }