-
Notifications
You must be signed in to change notification settings - Fork 328
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
Line-ending issue - 'env: python\r: No such file or directory' #142
Comments
Hi @replete. Running; "grep -IUlr $'\r'" on command line on the repo returns no results. So I don't think there should be any CR character in the repo itself. Do you get the same behaviour if you run gitinspector without installing it with npm? My guess is that the CR character(s) got introduced with the publishing of the NPM package (see #138), so I'll let @bartvanandel take a look at this. |
I fixed it by re-saving the file in VSCode. Thanks
Phil Ricketts
…On 14 January 2017 at 18:39, Adam Waldenberg ***@***.***> wrote:
Hi @replete <https://github.com/replete>.
Running; "grep -IUlr $'\r'" on command line on the repo returns no
results. So I don't think there should be any CR character in the repo
itself. Do you get the same behaviour if you run gitinspector without npm?
My guess is that the CR character(s) got introduced with the publishing of
the NPM package (see #138 <#138>),
so I'll let @bartvanandel <https://github.com/bartvanandel> take a look
at this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxkawlvYmw7lHmpyhiJx-A3F3q-Y3U7ks5rSRZVgaJpZM4Ljso8>
.
|
@replete Great. However, that doesn't really fix it. We also need to find out why it got there in the first place :). |
Seems I might be on to something :). You can read about the issue here; npm/npm#2097 and even more at npm/npm#12371. @bartvanandel, did you by any chance re-save any of the source files in gitinspector (particularly gitinspector.py) before publishing ? |
Let me have a look. According to the changes (https://github.com/ejwa/gitinspector/pull/138/files) gitinspector.py was not touched. However, the issue may be caused by the way git was configured when pushing the package to npm. By default (if the option is not set) git converts line endings for text files "in whatever way it thinks is best. This is a good default option." according to Dealing with Line Endings. Since I'm on Windows, this means it will convert to '\r\n'. I just checked out what npm has installed in its node_modules directory (note: I've installed gitinspector globally using BTW, it seems that the global install doesn't even use the new "gitinspector.js" file I've added. But it won'd hurt to have it I guess. |
Just verified, on Linux it has Windows-style line endings as well. I will change into Unix-style with the next update. In the mean time I'm happy that you've found a workaround. |
Fixed and re-published, see #138 for details. I checked it out on my Linux machine and the issue is no longer present after updating. Thanks for notifying me about the issue though, I've learned something today! |
@bartvanandel Great! Problem solved then I guess. Closing the issue :) |
Thanks for fixing this guys, incredible response. Sorry I wasn't much help after-the-fact. |
$ npm install -g gitinspector $ gitinspector ./ env: python\r: No such file or directory
This is the error I get after on OSX, it appears to be a line ending issue:
http://stackoverflow.com/questions/19425857/env-python-r-no-such-file-or-directory
The text was updated successfully, but these errors were encountered: