Skip to content

fix(scripts): add missing homedir import in persistent-mode.cjs#2181

Open
jonckr wants to merge 1 commit intoYeachan-Heo:devfrom
jonckr:fix/persistent-mode-homedir-import
Open

fix(scripts): add missing homedir import in persistent-mode.cjs#2181
jonckr wants to merge 1 commit intoYeachan-Heo:devfrom
jonckr:fix/persistent-mode-homedir-import

Conversation

@jonckr
Copy link
Copy Markdown

@jonckr jonckr commented Apr 5, 2026

Problem

homedir() is called in getIdleCooldownSeconds() (line 75) to build the config path ~/.omc/config.json, but was never imported from Node's os module. This causes a ReferenceError: homedir is not defined at runtime whenever the idle notification cooldown logic is evaluated.

Fix

Added const { homedir } = require('os'); to the require block at the top of the file.

Evidence

The parallel .mjs variant (scripts/persistent-mode.mjs:25) already imports it correctly: import { homedir } from "os";

Testing

  • node --check scripts/persistent-mode.cjs passes
  • npx tsc --noEmit passes
  • npm run lint passes
  • npm run build passes

homedir() was called in getIdleCooldownSeconds() but never imported
from 'os', causing a ReferenceError at runtime.

Confidence: high
Scope-risk: narrow
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant