nodejs_22: fix missing /bin/bash in tests

This commit is contained in:
Ivan Trubach 2024-07-03 18:08:51 +03:00 committed by K900
parent bb3a488046
commit 1404cb5c7b
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,14 @@
Fixes test/parallel/test-node-run.js subtest.
Note that this techinically depends on an impurity during build, see
also https://github.com/NixOS/nix/issues/6081. Currently stdenv allows
/bin/sh as an impure host dependency on Darwin, so we are guaranteed to
have it to certain degree, although it is very hacky.
--- a/test/fixtures/run-script/node_modules/.bin/positional-args
+++ b/test/fixtures/run-script/node_modules/.bin/positional-args
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/bin/sh
echo "Arguments: '$@'"
echo "The total number of arguments are: $#"

View File

@ -15,6 +15,7 @@ buildNodejs {
./bypass-darwin-xcrun-node16.patch
./node-npm-build-npm-package-logic.patch
./use-correct-env-in-tests.patch
./bin-sh-node-run-v22.patch
(fetchpatch2 {
# Fixes OpenSSL 3.0.14 compatibility in tests.
# See https://github.com/nodejs/node/pull/53373