Skip to content

fix(config): skip git lookup when hooks are disabled - #2458

Merged
fengmk2 merged 1 commit into
voidzero-dev:mainfrom
tarikermis:agent/skip-git-check-when-hooks-disabled
Aug 15, 2026
Merged

fix(config): skip git lookup when hooks are disabled#2458
fengmk2 merged 1 commit into
voidzero-dev:mainfrom
tarikermis:agent/skip-git-check-when-hooks-disabled

Conversation

@tarikermis

Copy link
Copy Markdown
Contributor

What changed

vp config now checks the Git hooks environment opt-out before resolving the hook location. With HUSKY=0, VP_GIT_HOOKS=0, or the legacy VITE_GIT_HOOKS=0, it skips hook setup without invoking Git.

Why

The opt-out previously lived inside install(), but vp config called the Git-backed location resolver first. Git-less containers therefore failed even though hooks were explicitly disabled.

Tests

  • Focused config hook tests: 36 passed, 1 existing platform skip
  • Regression test imports the real config entrypoint and makes the Git resolver throw if reached
  • Oxlint on the changed files

Fixes #2441

@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 27848db
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a7f4ddb95817300086ccf88

@fengmk2 fengmk2 self-assigned this Aug 15, 2026
@fengmk2

fengmk2 commented Aug 15, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 27848db377

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fengmk2
fengmk2 merged commit 6069fe9 into voidzero-dev:main Aug 15, 2026
45 checks passed
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.

vp config with VP_GIT_HOOKS=0 still requires git

2 participants