Skip to content

feat(installer): use resq hooks install with fallback to dev install-hooks#8

Merged
WomB0ComB0 merged 1 commit intomainfrom
feat/installer-use-hooks-subcommand
Apr 14, 2026
Merged

feat(installer): use resq hooks install with fallback to dev install-hooks#8
WomB0ComB0 merged 1 commit intomainfrom
feat/installer-use-hooks-subcommand

Conversation

@WomB0ComB0
Copy link
Copy Markdown
Member

Summary

Companion to resq-software/crates#60. Swap scripts/install-hooks.{sh,ps1} to call the new consolidated paths:

  • resq hooks install (was resq dev install-hooks)
  • resq hooks scaffold-local (was resq dev scaffold-local-hook)

Forward-compatible fallback

Both scripts --help-probe the new paths first. If the user's resq binary pre-dates #60 (e.g. a cached resq-cli-v0.2.6), the fallback uses the legacy dev paths, which still work because #60 kept them as deprecated aliases. No user-facing break regardless of which resq version they have installed.

Docs updated

README + AGENTS snippets now show the new canonical paths.

Test plan

  • shellcheck -S warning scripts/install-hooks.sh clean
  • End-to-end with master-built resq → "Installing hooks via resq hooks install", 6 hooks scaffolded, local-pre-push prompt works

🤖 Generated with Claude Code

…lback

Swap scripts/install-hooks.{sh,ps1} to the new consolidated command paths
introduced in resq-software/crates#60:

  resq hooks install         (was: resq dev install-hooks)
  resq hooks scaffold-local  (was: resq dev scaffold-local-hook)

Both scripts probe `--help` for the new paths first and fall back to the
legacy `dev` paths if the user's resq binary pre-dates the consolidation
(e.g. a cached v0.2.6). The legacy paths still work too — they just print
a deprecation warning. No user-facing break.

README + AGENTS snippets updated to show the new canonical paths.

Smoke-tested end-to-end with a master-built resq: the `hooks install`
path is taken silently; hooks land in .git-hooks/; local-pre-push
scaffold prompts as expected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

Warning

Rate limit exceeded

@WomB0ComB0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 10 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 8 minutes and 10 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c17487a0-afeb-4fe9-a1ee-44c9975ab8d1

📥 Commits

Reviewing files that changed from the base of the PR and between 53c17c1 and fda835f.

📒 Files selected for processing (4)
  • AGENTS.md
  • README.md
  • scripts/install-hooks.ps1
  • scripts/install-hooks.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/installer-use-hooks-subcommand

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@WomB0ComB0 WomB0ComB0 merged commit ab13eb5 into main Apr 14, 2026
5 checks passed
@WomB0ComB0 WomB0ComB0 deleted the feat/installer-use-hooks-subcommand branch April 14, 2026 21:10
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation and installation scripts to transition from legacy resq dev subcommands to the new resq hooks command structure. The scripts now include logic to detect command support and fall back to legacy versions for older binaries to maintain backward compatibility. Review feedback suggests improving the error reporting in both the shell and PowerShell scripts by dynamically referencing the command that actually failed, rather than hardcoding the new command name in warning messages when a fallback was used.

Comment thread scripts/install-hooks.sh
|| printf 'warn scaffold-local-hook failed; run it manually with --kind <name>.\n' >&2
# shellcheck disable=SC2086
(cd "$TARGET_ROOT" && "$RESQ_BIN" $scaffold_cmd --kind auto) \
|| printf 'warn scaffold-local failed; run it manually with --kind <name>.\n' >&2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The warning message hardcodes the new command name scaffold-local. If the script falls back to the legacy dev scaffold-local-hook and that command fails, the warning will suggest running a command (scaffold-local) that the user's current binary does not support. It would be better to use the command name that was actually attempted.

Suggested change
|| printf 'warn scaffold-local failed; run it manually with --kind <name>.\n' >&2
|| printf 'warn %s failed; run it manually with --kind <name>.\n' "$scaffold_cmd" >&2

Comment thread scripts/install-hooks.ps1
& $resqBin @scaffoldArgs --kind auto
if ($LASTEXITCODE -ne 0) {
Write-Host 'warn scaffold-local-hook failed; run it manually with --kind <name>.' -ForegroundColor Yellow
Write-Host 'warn scaffold-local failed; run it manually with --kind <name>.' -ForegroundColor Yellow
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the bash script, this warning message hardcodes scaffold-local. If the fallback command dev scaffold-local-hook was used and failed, the user is directed to run a command their binary likely doesn't support. Using the actual command attempted from $scaffoldArgs would be more accurate.

            Write-Host "warn  $($scaffoldArgs -join ' ') failed; run it manually with --kind <name>." -ForegroundColor Yellow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant