najadojo / gltf-import-export

Convert between GLB and GLTF files.
MIT License
204 stars 31 forks source link

changed line endings to LF in command line tool causing error on mac os #4

Closed jklimke closed 6 years ago

jklimke commented 6 years ago

Hi,

i noticed a problem with the command line tool that appears in MacOS environments.

I executed the following command in my node project root directory

./node_modules/.bin/gltf-import-export
env: node\r: No such file or directory

After opening the file in VSCode and converting the line ending to LF instead or CRLF the converter works fine.

Could you please try to fix the line endings within the tool file.

It seems to be a problem that is know also in npm and it seems that there is no better solution thanusing LF line endings for programming.

see: https://github.com/npm/npm/issues/12371 and https://github.com/nodejs/node/issues/11478 recommends

To resolve this, please either hand-write the first line in the script, or work with the project which created the script file and the shebang line to address this.

I did this in this pull request.

najadojo commented 6 years ago

@jklimke your changes didn't resolve the issue but I did make some configuration changes and published a new version to npm with the fixes. Thanks for bringing this to my attention.