From 2feb90475e12d23e892aef37bb01e2361dac4bc6 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Fri, 25 Oct 2024 18:57:29 +0200 Subject: Fix module resolution when $CWD != . --- scripts/test-non-cwd-exec.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/test-non-cwd-exec.sh (limited to 'scripts') diff --git a/scripts/test-non-cwd-exec.sh b/scripts/test-non-cwd-exec.sh new file mode 100755 index 00000000..7d33c46f --- /dev/null +++ b/scripts/test-non-cwd-exec.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i "bash -x" -p bash jq git nodejs +npm i +npm run setup || exit 1 + +export OWD="$PWD" +export NWD="`mktemp -d`" +echo "Src dir: $OWD" +echo "Exec dir: $NWD" + +#NODE_PATH="$OWD/dist" +node "$OWD/dist/api/start.js" \ No newline at end of file -- cgit 1.5.1