Skip to content

Avoid numerical conversion for file names in argv#164

Merged
jgm merged 1 commit into
commonmark:masterfrom
rlidwka:minimist
Jul 5, 2019
Merged

Avoid numerical conversion for file names in argv#164
jgm merged 1 commit into
commonmark:masterfrom
rlidwka:minimist

Conversation

@rlidwka

@rlidwka rlidwka commented Jul 3, 2019

Copy link
Copy Markdown
Contributor

If you run this:

./commonmark.js 1

Minimist converts 1 to a number, then fs.readFileSync(1, 'utf8') will
actually read FD 1 (i.e. stdin) instead of a file as one would expect.

Related issues:

https://github.com/substack/minimist/issues/36
https://github.com/substack/minimist/issues/32

If you run this:

```
./commonmark.js 1
```

Minimist converts 1 to a number, then fs.readFileSync(1, 'utf8') will
actually read FD 1 (i.e. stdin) instead of a file as one would expect.

Related issues:

https://github.com/substack/minimist/issues/36
https://github.com/substack/minimist/issues/32
@jgm jgm merged commit 856257d into commonmark:master Jul 5, 2019
@jgm

jgm commented Jul 5, 2019

Copy link
Copy Markdown
Member

Thanks!

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.

2 participants