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

Fixed the invalid type error while running init with a numeric folder name #45

Merged

Conversation

3 participants
@SumiMakito
Copy link
Contributor

commented Nov 29, 2018

This PR fixes an invalid type error that occurs while running hexo init with a numeric folder name.

E.g. Executing hexo init 233 will produce the error as follows:

FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type number
    at assertPath (path.js:39:11)
    at Object.resolve (path.js:1088:7)
    ... (Omitted)

Since there'll be a need to create a new hexo project with numeric folder name in some cases, I've ensured that a string will be passed to the resolve() function.

@coveralls

This comment has been minimized.

Copy link

commented Nov 29, 2018

Coverage Status

Coverage increased (+0.4%) to 86.071% when pulling e7fc5b9 on SumiMakito:fix_using_number_as_init_folder_name into bf6a072 on hexojs:master.

1 similar comment
@coveralls

This comment has been minimized.

Copy link

commented Nov 29, 2018

Coverage Status

Coverage increased (+0.4%) to 86.071% when pulling e7fc5b9 on SumiMakito:fix_using_number_as_init_folder_name into bf6a072 on hexojs:master.

@YoshinoriN
Copy link
Member

left a comment

LGTM! Thanks!
This change works well.

@YoshinoriN YoshinoriN merged commit 30d05ed into hexojs:master Nov 29, 2018

4 checks passed

codeclimate All good!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.4%) to 86.071%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.