Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bug regarding init project with a hexadecimal name #199

Closed
brelian opened this issue May 20, 2020 · 2 comments · Fixed by #200
Closed

A bug regarding init project with a hexadecimal name #199

brelian opened this issue May 20, 2020 · 2 comments · Fixed by #200
Labels

Comments

@brelian
Copy link
Contributor

brelian commented May 20, 2020

Is this a BUG REPORT or FEATURE REQUEST?
Maybe It's a bug.
What version you use:

hexo-cli: 3.1.0
os: Linux 4.4.0-18362-Microsoft linux x64
http_parser: 2.9.3
node: 10.20.1
v8: 6.8.275.32-node.56
uv: 1.34.2
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 64
nghttp2: 1.39.2
napi: 6
openssl: 1.1.1e
icu: 64.2
unicode: 12.1
cldr: 35.1
tz: 2019c

What happened:

When I execute hexo init 0x400, It will create a project named 1024 instead of 0x400. Always appears this issue when the target project is a Hexadecimal or Octal number. More instances,
bug-hexo-init-0x400

$ hexo init 070  ==> create folder named: 70
$ hexo init 0xAB ==> create folder named: 171

What you expected to happen:

When I execute hexo init 0x400, I expect to initialize the project into the 0x400 folder.

How to reproduce it (as minimally and precisely as possible):

hexo init 0x400

Anything else we need to know?:

It seems this issue introduces by minimist. It aways parses as a number with leading 0x.

@SukkaW SukkaW added the bug label May 20, 2020
@SukkaW
Copy link
Member

SukkaW commented May 20, 2020

This seems to be caused by #45

@brelian
Copy link
Contributor Author

brelian commented May 20, 2020

Not exactly, I think. It seems to be caused by minimist.
It aways parses as a number with leading 0x string. I will try to fix this tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants