Skip to content

fix: expand scripts from args when -e already has a leading dot - #2290

Open
kevin9327 wants to merge 1 commit into
remy:mainfrom
kevin9327:fix-leading-dot-ext-expand
Open

kevin9327 wants to merge 1 commit into
remy:mainfrom
kevin9327:fix-leading-dot-ext-expand

Conversation

@kevin9327

Copy link
Copy Markdown

The first expandScript call (when the script comes from args rather than options.script) prepended '.' to the raw --ext / -e value before the later normalizer stripped leading dots.

So nodemon -e .js app looked for app..js and never resolved app.js. nodemon -e js app was already fine. The later options.script path was also fine because it runs after extensions are normalized.

This strips a leading dot on that early path so both forms resolve the same way, and adds a test that chdirs into test/fixtures and runs exec({ args: ['app'], ext: '.js' }).

The early expandScript path prepended another '.' to the first extension
before the later normalizer stripped leading dots. `nodemon -e .js app`
looked for `app..js` and never resolved `app.js`.
@netlify

netlify Bot commented Nov 12, 2026

Copy link
Copy Markdown

👷 Deploy request for nodemon pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit b1b7953

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T06:51:31.472279Z b1b7953 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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