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
Describe the bug
On systems that don't follow Linux FHS (e.g. nixos), the jest extension fails to find /bin/bash. It is better to use /usr/bin/env bash in shebang scripts and code so that the correct interpreter is automatically selected.
To Reproduce
Steps to reproduce the behavior: (ON NIXOS)
Go to any test
Click on 'RUN'
See error
Note: A sample repo will help us identify the bug much faster. 🙏
Expected behavior
Tests are run similar to other distros
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
vscode-jest version: v6.4.0
node -v: 22.10.0
npm -v: 10.9.0
Operating system: nixos-unstable
Prerequisite
are you able to run jest from the command line? YES
where do you run jest CLI from? Project and workspace root
how do you run your tests from the command line? npm run test
Additional context
Seems to be an issue with FHS because there's no /bin/bash in nixos.
$ npm config list [14:50:30]
; node bin location = /nix/store/2p8ilfl32xmhz49qghsayprxc001n2yv-nodejs-22.10.0/bin/node
; node version = v22.10.0
; npm local prefix = # masked
; npm version = 10.9.0
; cwd = # masked
; HOME = /home/sysarcher
; Run `npm config ls -l` to show all defaults.
$ npm config list -l
...
shell = "/run/current-system/sw/bin/zsh"
...
The fastest (and the most fun) way to resolve the issue is to submit a pull request yourself. If you are interested, please check out the contribution guide, we look forward to seeing your PR...
The text was updated successfully, but these errors were encountered:
sysarcher
changed the title
[BUG]
[BUG] Extension incompatible with non FHS systems (e.g. NIXOS)
Dec 3, 2024
Describe the bug
On systems that don't follow Linux FHS (e.g. nixos), the jest extension fails to find
/bin/bash
. It is better to use/usr/bin/env bash
in shebang scripts and code so that the correct interpreter is automatically selected.To Reproduce
Steps to reproduce the behavior: (ON NIXOS)
Note: A sample repo will help us identify the bug much faster. 🙏
Expected behavior
Tests are run similar to other distros
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
v6.4.0
node -v
:22.10.0
npm -v
:10.9.0
Prerequisite
npm run test
Additional context
Seems to be an issue with FHS because there's no
/bin/bash
in nixos.maybe related: #883
The fastest (and the most fun) way to resolve the issue is to submit a pull request yourself. If you are interested, please check out the contribution guide, we look forward to seeing your PR...
The text was updated successfully, but these errors were encountered: