TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

CLI breaks on OS X due to CRLF line breaks #33

Closed maxdavidson closed 8 years ago

maxdavidson commented 8 years ago

The CLI does not work when run on OS X, and probably all Unix-based systems.

> dts-bundle
env: node\r: No such file or directory

This is because dts-bundle.js is using Windows-style CRLF (\r\n) line breaks, confusing bash. It doesn't see the hidden character CR (\r) in #!/usr/bin/env node\r\n, interpreting it as part of the name. This hidden character must be removed for the file to execute successfully.

See https://github.com/npm/npm/issues/4607

tolemac commented 8 years ago

I didn't know this issue. I just have released 0.4.2 version with this change.

I haven't unix based system and I can't try it. Tell me know if you test it.

Thanks!

maxdavidson commented 8 years ago

Great, it seems to work now! Thanks!

tolemac commented 8 years ago

Great!