ejs doesn't throw error on unknown command-line option
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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