GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `vp migrate --full` asks to set up pre-commit hooks even when they're already configured · Issue #3096 · voidzero-dev/vite-plus

vp migrate --full asks to set up pre-commit hooks even when they're already configured #3096

New issue
Copy link
New issue
Copy link
Closed
#3118
Closed
vp migrate --full asks to set up pre-commit hooks even when they're already configured#3096
#3118
Copy link
Assignees
0froq
Labels
contribution welcome

Description

@hyunbinseo
hyunbinseo
opened on Oct 17, 2026
Issue body actions

Description

In a project that already has Vite+ hooks (.vite-hooks/pre-commit, core.hooksPath=.vite-hooks/_), vp migrate --full still asks:

◇ Set up pre-commit hooks to run formatting, linting, and type checking with auto-fixes?
  Yes / No

It defaults to Yes and doesn't say hooks already exist. Answering No sounds like it might disable them, though it doesn't.

The agent prompt in the same run detects the existing file and offers Append/Skip:

› Agent instructions already exist at AGENTS.md.
    Append
  › Skip: Leave existing file unchanged

promptGitHooks() doesn't check hasExistingViteHooksPolicy(), which setupGitHooks() already uses to leave the hook as it is.

Suggested solution

When existing Vite+ hooks are detected, either:

  • Skip the prompt and log Git hooks already configured, or
  • Say so in the prompt and offer Keep/Skip, like the agent prompt does.

Additional context

  • vp v1.3.0
  • Related: voidzero-dev/vite-plus#2459

Validations

  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.
Reacted by MK (fengmk2), JongKyung Lee and froQ

Activity

  1. fengmk2
    added
    contribution welcome
    on Oct 17, 2026
  2. 0froq commented on Oct 18, 2026

    @0froq
    0froq
    on Oct 18, 2026
    Contributor
    More actions

    I have a fix ready for this, following the second option: when existing Vite+ hooks are detected (and --hooks/--no-hooks isn't passed), the prompt becomes a Keep/Skip select mirroring the AGENTS.md one, listing the detected hooks, e.g. "Git hooks already configured in .vite-hooks/ (pre-commit, commit-msg)". Keep (default) leaves them unchanged; Skip leaves the hooks setup untouched. Non-interactive behavior is unchanged. Tests included.

    Branch: https://github.com/0froq/vite-plus/tree/fix/migrate-existing-hooks-prompt
    I also have the first option (skip the prompt and log) ready if you'd prefer that. Happy to open a PR with whichever you like.

  3. fengmk2
    assigned
    0froq
    on Oct 19, 2026
  4. fengmk2 commented on Oct 19, 2026

    @fengmk2
    fengmk2
    on Oct 19, 2026
    Member
    More actions

    @0froq send the pr please 👍

    Reacted by froQ
  5. fengmk2
    added a commit that references this issue on Oct 20, 2026

    fix(migrate): show existing git hooks and offer Keep/Skip

    This issue will close once commit 00c7c5c is merged into the 'main' branch.
    00c7c5c
  6. fengmk2
    closed this as completedin #3118on Oct 20, 2026
  7. jong-kyung
    added a commit that references this issue on Oct 20, 2026

    fix(migrate): skip git hooks setup when already configured (voidzero-…

    This issue will close once commit cffe33f is merged into the 'main' branch.
    cffe33f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @0froq
    0froq

Labels

contribution welcome

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.