From 8a6ed33e026b2c3efeadf171a2dbc3e9f28ec8dc Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Mon, 6 Mar 2023 08:16:33 -0500 Subject: [PATCH] Apply dos2unix to script bin files After we started generating our own bin links, we did not provide the line-ending normalization that npm did. This corrects that to have similar behavior to before for packages with CRLF line-endings. --- nix/node-env.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nix/node-env.nix b/nix/node-env.nix index 5dad9ec..9874fdd 100644 --- a/nix/node-env.nix +++ b/nix/node-env.nix @@ -535,6 +535,8 @@ let do file="$(readlink -f "$i")" chmod u+rwx "$file" + isScript "$file" || continue + sed -i 's/\r$//' "$file" # convert crlf to lf patchShebangs "$file" done fi