stylelint-lsp: fix script launch issue on macOS
A leading space before the shebang doesn't affect script execution when run from the shell or via exec on Linux. However, on macOS, it results in an ENOEXEC (File format error) when using exec. This fix removes the space to ensure stylelint-lsp can be launched from nixvim on macOS without errors. Thanks to @gepbird for suggesting the proper fix.
This commit is contained in:
parent
6ced9c6711
commit
dc55dab2ae
@ -1,5 +1,4 @@
|
||||
{
|
||||
bash,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
nodejs,
|
||||
@ -18,8 +17,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-mzhY6MKkXb1jFYZvs/VkGipBjBfUY3GukICb9qVQI80=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
buildInputs = [
|
||||
nodejs
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pnpm_9.configHook
|
||||
];
|
||||
|
||||
@ -41,11 +43,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
|
||||
mkdir -p $out/{bin,lib/${finalAttrs.pname}}
|
||||
mv {dist,node_modules} $out/lib/${finalAttrs.pname}
|
||||
echo "
|
||||
#!${lib.getExe bash}
|
||||
${lib.getExe nodejs} $out/lib/${finalAttrs.pname}/dist/index.js \$@
|
||||
" > $out/bin/stylelint-lsp
|
||||
chmod +x $out/bin/stylelint-lsp
|
||||
chmod a+x $out/lib/${finalAttrs.pname}/dist/index.js
|
||||
ln -s $out/lib/${finalAttrs.pname}/dist/index.js $out/bin/stylelint-lsp
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user