Skip to content

Commit 948d795

Browse files
committed
test: add debug statements
1 parent f651e5d commit 948d795

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

scripts/examples-generate.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@ for dir in "$ROOT_DIR"/examples/*/; do
4444
echo "Generating: $example_name"
4545
set -e
4646
cd "$dir"
47-
echo "-> Running pnpm -s exec openapi-ts"
48-
# Use `pnpm exec` so the CLI binary from the workspace is resolved in CI
49-
pnpm -s exec openapi-ts
47+
echo "-> Debug: node $(node --version 2>/dev/null || echo 'node-not-found')"
48+
echo "-> Debug: pnpm $(pnpm --version 2>/dev/null || echo 'pnpm-not-found')"
49+
echo "-> Debug: pwd $(pwd)"
50+
echo "-> Running pnpm exec for openapi-ts (workspace-aware if available)"
51+
# Use `pnpm -w exec` when available so the CLI binary from the workspace is resolved in CI
52+
if pnpm -w -s --version >/dev/null 2>&1; then
53+
pnpm -w -s exec openapi-ts
54+
else
55+
pnpm -s exec openapi-ts
56+
fi
5057

5158
# Format generated files in this example only to keep the step fast
5259
if command -v pnpm >/dev/null 2>&1 && pnpm -w -s --version >/dev/null 2>&1; then

0 commit comments

Comments
 (0)