You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As with title, yarn global add mssql && mssql will fail with something like Command not found: node\r on linux/mac.
This is a known issue/difference with yarn from NPM, which will fix up the installed file line endings, but it's easy enough to fix for the package author - depending on your publishing setup, this may be as simple as adding a .gitattributes with * text=auto eol=lf or specifically bin/mssql text eol=lf if the former causes issues.
Expected behaviour:
The package bin file, at least, should be published with Unix line endings.
Actual behaviour:
When installed with yarn, the bin file uses Windows line endings, which confuses /usr/bin/env, as it looks for a binary called node\r, due to the hashbang line being #!/usr/bin/env node\r\n and it interpreting only the \n as the line ending.
When installed with NPM, it will fixup the line endings to be unix so this works.
Configuration:
Software versions
NodeJS: v14.4.0
node-mssql: v6.3.0
SQL Server:
The text was updated successfully, but these errors were encountered:
@simonbuchan thanks for reporting this; I've tried to fix this but when I was checking out locally on my windows machine I wasn't noticing the bin file had CRLF line endings. I've gone and published 6.3.1 which hopefully will solve the problem. Let me know if you have any more problems.
As with title,
yarn global add mssql && mssql
will fail with something likeCommand not found: node\r
on linux/mac.This is a known issue/difference with yarn from NPM, which will fix up the installed file line endings, but it's easy enough to fix for the package author - depending on your publishing setup, this may be as simple as adding a
.gitattributes
with* text=auto eol=lf
or specificallybin/mssql text eol=lf
if the former causes issues.Expected behaviour:
The package bin file, at least, should be published with Unix line endings.
Actual behaviour:
When installed with yarn, the bin file uses Windows line endings, which confuses
/usr/bin/env
, as it looks for a binary callednode\r
, due to the hashbang line being#!/usr/bin/env node\r\n
and it interpreting only the\n
as the line ending.When installed with NPM, it will fixup the line endings to be unix so this works.
Configuration:
Software versions
The text was updated successfully, but these errors were encountered: