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

EJS-lint hangs with invalid file path #86

Closed
YZirkind opened this issue Apr 7, 2021 · 1 comment · Fixed by #87
Closed

EJS-lint hangs with invalid file path #86

YZirkind opened this issue Apr 7, 2021 · 1 comment · Fixed by #87

Comments

@YZirkind
Copy link
Contributor

YZirkind commented Apr 7, 2021

Context: I'm running EJS-lint on Windows; Windows' path delimiter is a backwards-slash (e.g. C:\path\to\file.ext).

EJS-lint uses globby to generate a list of files from the paths provided as arguments. This is not mentioned in usage, nor in the Readme. Because globby doesn't support backward-slashes, when I pass in Windows path (e.g. views\index.ejs), it returns an empty array. So this:

read(glob(argv._))

becomes:

    read([])

which never resolves, because read will then wait for stdin.

I would suggest documenting this, or using something like slash (by the developer of globby) to process the file paths before passing them into globby.

@RyanZim
Copy link
Owner

RyanZim commented Apr 7, 2021

Good point, PR welcome to add slash.

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 a pull request may close this issue.

2 participants