Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions src/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,20 @@ if [ "$major" -lt 22 ]; then
echo "submitfleet needs Node.js 22.5 or newer (found $(node -v))" >&2
exit 1
fi
if command -v pnpm >/dev/null 2>&1; then
pnpm add -g @profullstack/submitfleet
# npm first: its global bin works out of the box. pnpm only when npm is missing or fails
# (pnpm add -g aborts unless its global bin directory was set up beforehand).
if command -v npm >/dev/null 2>&1 && npm install -g @profullstack/submitfleet; then
bin_dir="$(npm prefix -g)/bin"
elif command -v pnpm >/dev/null 2>&1 && pnpm add -g @profullstack/submitfleet; then
bin_dir="$(pnpm bin -g)"
else
npm install -g @profullstack/submitfleet
echo "submitfleet: install failed (tried npm and pnpm)" >&2
exit 1
fi
if command -v submitfleet >/dev/null 2>&1; then
submitfleet doctor || true
echo "Installed. Try: submitfleet coverage report"
else
echo "Installed to $bin_dir, which is not on your PATH. Add it, then run: submitfleet doctor"
fi
submitfleet doctor || true
echo "Installed. Try: submitfleet coverage report"
`;
Loading