fork of hey-api/openapi-ts because I need some additional things

test: more debug

Lubos 0a76a039 a9ae5cd4

+13 -5
+13 -5
scripts/examples-generate.sh
··· 55 55 echo "-> Debug: node $(node --version 2>/dev/null || echo 'node-not-found')" 56 56 echo "-> Debug: pnpm $(pnpm --version 2>/dev/null || echo 'pnpm-not-found')" 57 57 echo "-> Debug: pwd $(pwd)" 58 - echo "-> Running pnpm exec for openapi-ts (workspace-aware if available)" 59 - # Use `pnpm -w exec` when available so the CLI binary from the workspace is resolved in CI 60 - if pnpm -w -s --version >/dev/null 2>&1; then 61 - pnpm -w -s exec openapi-ts 58 + echo "-> Running pnpm run openapi-ts (invokes package script in example)" 59 + # Run the example's package script so pnpm resolves the workspace binary correctly 60 + # Use silent mode to keep logs concise but preserve errors 61 + echo "--- begin openapi-ts output ---" 62 + if pnpm -s --version >/dev/null 2>&1; then 63 + pnpm -s run openapi-ts || rc=$? 62 64 else 63 - pnpm -s exec openapi-ts 65 + pnpm run openapi-ts || rc=$? 66 + fi 67 + rc=${rc:-0} 68 + echo "--- end openapi-ts output (rc=$rc) ---" 69 + if [ "$rc" -ne 0 ]; then 70 + echo "openapi-ts failed with exit code $rc" 71 + exit $rc 64 72 fi 65 73 66 74 # Format generated files in this example only to keep the step fast