Repository navigation
Conversation
createNamedProject wrapped every scaffold failure in NamedProjectFolderError, so a missing git binary surfaced as "Failed to create the project folder." A ChildProcess spawn NotFound from git now fails with NamedProjectGitMissingError, which names the cause. Fixes pingdotgg#28210 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Closing in favor of #28219, which fixes the same thing. Thanks for picking this up so quickly! |
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Project creation now explains when Git is missing instead of reporting a generic folder error. Existing creation behavior and failure cleanup are unchanged, keeping the change narrowly scoped. You can add or adjust custom eligibility rules. Learn more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Creating a new project on a machine without Git fails with "Failed to create the project folder." The real cause is that
git initcan't spawn, butcreateNamedProjectwraps every scaffold failure inNamedProjectFolderError, whose fixed message hides it. Reported in #28210 (Windows 11, desktop 0.1.6;ManagedProjectFolders.tsis unchanged onmain).Change
When the scaffold failure is a
GitCommandErrorwhose cause is aChildProcessspawnNotFound(the missing-executable condition),createNamedProjectnow fails withNamedProjectGitMissingError: "Git is not installed in this environment. Install Git to create a project." Other failures still produceNamedProjectFolderError, and the folder cleanup is unchanged.The
projects.createNewWebSocket handler and thet3_project_createMCP tool both forwarderror.message, so web, desktop, mobile, and agents get the new text without client changes.Scope and approval
Fixes #28210. This is a very small, focused fix for an obvious bug: the server knows why project creation failed but reports a generic error. Behavior is otherwise unchanged. Creating a project still requires Git, and this only names that requirement when it's missing. It's the same missing-Git condition #10376 and #14942 handled for repository detection on folder open. Those fixes don't cover the new-project path.
Verification
ManagedProjectFolders.test.tsthat fakes the driver's spawn failure (PlatformErrorNotFoundfromChildProcess.spawn). That matches the reporter's server trace:PlatformError: NotFound: ChildProcess.spawn (git init --initial-branch=main). The case also asserts the folder is removed and no project is created.main: fails withexpected 'NamedProjectFolderError' to equal 'NamedProjectGitMissingError'.vp test run src/project/ManagedProjectFolders.test.tspasses 13/13.vp run check:changedpasses: format, lint, knip, graphql, typecheck (scripts, evals, apps/server), and tests (14 passed).Written with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code