mde / mde/ejs

ejs doesn't throw error on unknown command-line option

Open
#690 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
8.1k
Forks
846
PR merge metrics
No merged PRs in 30d

Description

Try any arbitrary command and it just works:

npx ejs file.ejs -o file.html --foo

This is only my second time using EJS, so perhaps this is intended behavior, but I believe most tools would emit a help warning. If it is intended behavior, then the actual use case that caused me to find this should perhaps be addressed in some other way. I was changing the delimiter and using

npx ejs file.ejs -m'|'

It took me two days to figure out that I needed a space after -m :(

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the npx ejs command-line entry point and reproduce the reported invocations: an unknown --foo option and -m'|' without a space. Check how command-line options are parsed and review the existing CLI tests, if present. Done should define and verify the behavior for unknown options and the delimiter argument syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.