-
Notifications
You must be signed in to change notification settings - Fork 40
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
2.0.6 breaks the CLI! #108
Comments
Similar response on OS X (10.12.4) with the same NPM && Node.js: $ node_modules/.bin/templatizer
env: node\r: No such file or directory Ruh roh! Seeing the same thing with Node.js@6.10.2 and npm@3.10.10. Update: Just confirmed 2.0.5’s CLI works fine. Unfortunately, there’s no templatizer code changes in the latest bump: $ git diff v2.0.5..v2.0.6 --name-only
README.md
package.json …which points to the bug coming from one of those updates. Might be nice to add some sort of CLI integration test to ensure this doesn’t happen again. Update 2: Cloned the repo. Running Update 3:
|
A little web search revealed nwutils/nw-builder#75, which indicates that a bad line ending on bin/cli’s shebang line messes up the $ npm i templatizer@2.0.6
# Install...
$ file node_modules/templatizer/bin/cli
node_modules/templatizer/bin/cli: a /usr/bin/env node script text executable, ASCII text, with CRLF line terminators
$ npm i templatizer@2.0.5
# Install...
$ file node_modules/templatizer/bin/cli
node_modules/templatizer/bin/cli: a /usr/bin/env node script text executable, ASCII text Indeed, when I manually change the line endings in _node_modules/templatizer/bin/cli _ everything works. I assume git modifies line endings when cloning repositories, which is why I was unable to reproduce when I cloned this repository directly. Now, how to fix the issue… |
Thanks @swashcap. |
There were a lot of dependencies updated before I bumped the version. While I have not seen this in my dev or production environments, I will test several OS's and plan to narrow down the module-update cause. |
@HenrikJoreteg Yeah, pinning to @gdibble I believe its last package publish occurred on a Windows machine, which modified the executable shebang line to: - #!/usr/bin/env node\n
+ #!/usr/bin/env node\r\n This change wouldn't be tracked by git because it figures out line endings for the OS automatically. The new line endings were pushed to npm with the 2.0.6 publish (that |
@swashcap I was able to debug the issue and found the |
Bug
templatizer’s v2.0.6 contains a breaking change to the CLI functionality. Running the bin results in an error message:
$ node_modules/.bin/templatizer : No such file or directory
This should output the
usage
info. CLI use with-d
and-o
flags produces the same error message.Environment
Related: #107
The text was updated successfully, but these errors were encountered: