FS#75398 - [pyright] pyright should use the system's nodejs
Attached to Project:
Community Packages
Opened by Ian Liu (ianliu) - Friday, 22 July 2022, 13:48 GMT
Last edited by Daniel M. Capella (polyzen) - Monday, 01 August 2022, 04:09 GMT
Opened by Ian Liu (ianliu) - Friday, 22 July 2022, 13:48 GMT
Last edited by Daniel M. Capella (polyzen) - Monday, 01 August 2022, 04:09 GMT
|
Details
Description: pyright and pyright-langserver are both nodejs
programs with the following shebang:
#!/usr/bin/env node This shebang is not ideal as it is using my current nodejs environment, causing pyright to malfunction. The shebang should be updated to point to the system's nodejs, like so: #!/usr/bin/node Additional info: * package version(s): pyright 1.1.261-1 Steps to reproduce: echo "echo this shouldnt be called" > ~/.local/bin/node chmod +x ~/.local/bin/node PATH=$HOME/.local/bin:$PATH pyright |
This task depends upon
Closed by Daniel M. Capella (polyzen)
Monday, 01 August 2022, 04:09 GMT
Reason for closing: Not a bug
Monday, 01 August 2022, 04:09 GMT
Reason for closing: Not a bug
Comment by
Daniel M. Capella (polyzen) -
Friday, 22 July 2022, 20:28 GMT
Comment by Ian Liu (ianliu) -
Monday, 25 July 2022, 16:57 GMT
Comment by
Daniel M. Capella (polyzen) -
Monday, 25 July 2022, 22:59 GMT
If this wasn't intended by upstream, the fix should be suggested
there.
Upstream cannot use any particular node binary because it doesn't
know which binary will be used to install the package. But in Arch
Linux the node binary is known, and the pyright package depends on
nodejs for a reason. That's why I think the PKGBUILD should patch
the `pyright` and `pyright-langserver` scripts to use the system's
nodejs.
Every Node.js package I've checked uses `#!/usr/bin/env node`.
Perhaps there's a better, client-side solution.