Closed gracjan closed 10 years ago
Thanks for the report.
I have no experience with melpa, but your prompt suggests that it uses npm to install typescript-tools
. And indeed, when I git clone the repo on ubuntu, with default settings, the EOLs seem to cause no trouble, while an npm install has the CRLFs and can't run bin/tss
.
Will fix for next npm package update.
env: node\r: No such file or directory
This is definitely a real problem: I publish my own projects from a Windows machine and my Linux users reported it too.
A extra problem was that Git likes to mess with auto newline conversions so the problem came back after checkouts.
It is easy to solve with a simple string replace in the npm pre-publish script.
Git manual suggests that putting a line bin/tss eol=lf in .gitattributes would tell git to always use unix eol for this specific file independent of current system. I did not test as I do not have Windows machine handy.
That certainly works for checkouts, but it still breaks when your IDE or some other tool interferes and add CRLF's again (learned this the hard way).
So if you want to be 100% sure it is safest to do a replace in the npm prepublish.
should be fixed in npm package version 0.3.1
TSS as distriubuted via melpa has DOS end-of-line encodings for bin/tss. This makes unix shell look for "node\r" instead of "node".
This seems to be a git feature that it checks out bin/tss in text mode with CRLF on Windows and LF on Unix so that if you create melpa package on Windows you get CRLF in text files. Usually it does not matter but causes bash to stumble. Exact message:
Please make sure that LF is used for unix scripts always.