ayoubserti / node-iohook

Binding of libuiohook for nodejs
22 stars 11 forks source link

NPM package published with windows line endings #10

Open willemkokke opened 7 years ago

willemkokke commented 7 years ago

Hi,

When I add node-iohook as a dependency to my projects, it fails to install on mac (and I assume linux as well)

I've tracked it down to the libuiohook/bootstrap.sh containing windows line endings (CRLF) which prevent /bin/sh from executing it.

If I check the project using git, it installs fine

ayoubserti commented 7 years ago

Thank you @willemkokke for reporting this issue.

Now it resolved in version 0.0.2 please try it and let me know.

willemkokke commented 7 years ago

Hi @ayoubserti,

bootstrap.sh is perfect, unfortunately the same needs to be done for Makefile.am and configure.ac before it works.

ayoubserti commented 7 years ago

Hi @willemkokke,

Could you please make a PR, I'm under Windows right now.

Thanks.

sobolevn commented 7 years ago

You can add these lines into .gitattributes file:

*.sh     -crlf
*.ac     -crlf
*.am     -crlf
willemkokke commented 7 years ago

The problem is that they need to be unix line endings at publishing time. And I can't publish a new version of your package, only you can.

If I understand @sobolevn right, adding those line to your .gitattributes files, means that those files will be checked out with unix line endings, even on windows.

If so, that would an excellent solution.

rajjagani021 commented 7 years ago

Hi

@willemkokke , @sobolevn I am trying to installing this package and getting the same error you mentioned it above and as per your solution I am creating .gitattributes file and adding those line but still can't get install the package and getting the following error.

error: AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL_AMFLAGS=.I m4

any help would be appreciated.

willemkokke commented 7 years ago

Hi @rajjagani.

Unfortunately, if this is a solution (it was @sobolevn's idea, it sounds good to me, but I haven't tried) it will only work if @ayoubserti implements it and publishes a new version that doesn't have Windows line endings in the configure scripts

Plaque-fcc commented 5 years ago

Can we have it updated in the NPM repository? Pretty please…