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

will not patch node.js .cc files if working with git repo node source (on windows?) #279

Closed
btsimonh opened this issue Dec 1, 2016 · 3 comments

Comments

@btsimonh
Copy link

btsimonh commented Dec 1, 2016

in exe.js, nexe loads files and runs split('\n'), then compares lines. If the node source used is the git repo (maybe only on windows), the line endings in the .cc files are \r\n, and the subsequent line comparisons fail.

replacing
let lines = mainC.split('\n');
with
let lines = mainC.replace(/\r\n/g,'\n').split('\n');

and
var contentsSplit = contents.split('\n');
with
var contentsSplit = contents.replace(/\r\n/g,'\n').split('\n');

will make it work in all cases?

@jaredallard
Copy link
Member

Interesting, I haven't seen this yet. I'll check it out, and for now just throw it in v2 branch. Thanks!

@btsimonh
Copy link
Author

btsimonh commented Dec 2, 2016

i've modified my global git config ("core.autocrlf" is set to "input"), and will report if this helps. In the end, the build of direct GIT 6.9.1 (with autocrlf=auto) did not work for some reason; i'm wondering if there is something else (maybe on node build itself) which is line ending sensitive.....

@calebboyd
Copy link
Member

fixed in #308

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

No branches or pull requests

3 participants