You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a file with shebang header (because of Mac users).
We have core.autocrlf=true therefore the line endings on Macs are \n and Win \r\n.
When checking headers on Windows it never finds headers. It has to detect them in a file starting with: #!/usr/bin/env node\r\n/**\r\n * Copyright\r\n */
There is a little mistake in hasHeader method: var m = src.match(/(\r\n|\r|\n)/); does not fit to the: src = src.slice(m.index + 1); - in case of Windows' EOL the are two characters instead of one.
We have a file with shebang header (because of Mac users).
We have core.autocrlf=true therefore the line endings on Macs are
\n
and Win\r\n
.When checking headers on Windows it never finds headers. It has to detect them in a file starting with:
#!/usr/bin/env node\r\n/**\r\n * Copyright\r\n */
There is a little mistake in
hasHeader
method:var m = src.match(/(\r\n|\r|\n)/);
does not fit to the:src = src.slice(m.index + 1);
- in case of Windows' EOL the are two characters instead of one.I have a fix proposition in this pull request
The text was updated successfully, but these errors were encountered: