Skip to content

Commit ea06f5e

Browse files
committed
use install helper
1 parent e7254bf commit ea06f5e

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

tests/pact-tests/run-pact-tests.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,23 @@
22

33
set -euo pipefail
44

5+
install_package() {
6+
local package=$1
7+
local tmplog
8+
tmplog="$(mktemp)"
9+
10+
pnpm install --no-lockfile "$package" 2>&1 | tee "$tmplog"
11+
12+
if grep -q 'ERR_PNPM' "$tmplog"; then
13+
echo "Error: pnpm install failed for $package" >&2
14+
exit 1
15+
fi
16+
17+
pnpm list "$package"
18+
}
19+
520
# Ensure we have the latest package matching the major version
6-
npm install --no-lockfile @nhsdigital/nhs-notify-event-schemas-letter-rendering@^2.0.0
21+
install_package @nhsdigital/nhs-notify-event-schemas-letter-rendering@^2
722

823
# Remove old PACTs
924
rm -rf ./.pacts

0 commit comments

Comments
 (0)