Roo-Code/.husky/pre-commit
Jason Owens 87b9b72b32
Corrected bug in openrouter.ts and pre-commit and pre-push husky scripts (#1853)
- Corrected error causing free models listed under openrouter to show pricing information
- Updated pre-push and pre-commit scripts to work in Windows environments when pushing to branch (windows requires npm/npx to include the ".cmd" extension to recognize and compile.
2025-03-23 02:12:53 -04:00

15 lines
No EOL
329 B
Text

branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "main" ]; then
echo "You can't commit directly to main - please check out a branch."
exit 1
fi
# Detect if running on Windows and use npx.cmd, otherwise use npx
if [ "$OS" = "Windows_NT" ]; then
npx_cmd="npx.cmd"
else
npx_cmd="npx"
fi
"$npx_cmd" lint-staged