Repository navigation
fix(new): fail when the git repository setup fails - #288
Merged
Exeloo merged 1 commit intoNov 22, 2026
Merged
Conversation
Signed-off-by: sarankumar1325 <120080287+sarankumar1325@users.noreply.github.com>
Exeloo
approved these changes
Nov 22, 2026
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.
What does this PR do?
Fixes #285.
nf new --gitignored the result ofsetupGitRepository, so a failedgit initorgit remote add(nogitbinary, a bad remote) showed a failed spinner and then the success message, with exit code 0.handlenow uses that result:res = (await this.setupGitRepository(...)) && res. The git setup still runs after a failed install, as before, so the user still gets a repository where possible. Either failure makes the command fail.How do you test this PR?
New
src/action/actions/new.action.spec.tsstubscollectValues,scaffold,installDependenciesandsetupGitRepository:{ success: false }({ success: true }onmain, so this test fails there).{ success: true }, and a failed install with a successful git setup stays{ success: false }.--git, the git setup isn't called.pnpm run test:unit(264 passed, after buildinglibs/registryandlibs/config),tsc --noEmit, prettier and eslint pass.I used an AI coding assistant for this change. I reviewed the diff and ran the tests above.