Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-nx-workspace: Check and prompt for git config when not yet configured #15287

Open
spotlesscoder opened this issue Feb 27, 2023 · 4 comments
Assignees
Labels
community This is a good first issue for contributing scope: misc Misc issues type: feature

Comments

@spotlesscoder
Copy link

spotlesscoder commented Feb 27, 2023

Description

I want create-nx-workspace to check for valid git config (user.name, user.email) so that the git init does not fail like it did on my freshly installed linux

 ~/nx-e2e-include  npx create-nx-workspace         ✔  13:38:19 

 >  NX   Let's create a new workspace [https://nx.dev/getting-started/intro]

✔ Choose what to create                 · integrated
✔ What to create in the new workspace   · next
✔ Repository name                       · nx-e2e-include
✔ Application name                      · web
✔ Default stylesheet format             · css
✔ Enable distributed caching to make your CI faster · No

 >  NX   Nx is creating your v15.7.2 workspace.

   To make sure the command works reliably in all environments, and that the preset is applied correctly,
   Nx will run "npm install" several times. Please wait.

✔ Installing dependencies with npm
✔ Nx has successfully created the workspace: nx-e2e-include.
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'user@hostname.(none)')

 >  NX   Could not initialize git repository

   undefined


 ——————————————————————————————————————————————————————————————


 >  NX   First time using Nx? Check out this interactive Nx tutorial.

   https://nx.dev/react-tutorial/1-code-generation

Motivation

Reduce potential for failure to generate workspace

Suggested Implementation

Parse the effective git config of the user running create-nx-workspace

Alternate Implementations

Copy link

github-actions bot commented Nov 5, 2023

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Nov 5, 2023
@spotlesscoder
Copy link
Author

Bump

@github-actions github-actions bot removed the stale label Nov 6, 2023
@FrozenPandaz FrozenPandaz added the community This is a good first issue for contributing label Apr 2, 2024
@FrozenPandaz
Copy link
Collaborator

Would you like to open a PR to contribute this feature?

@spotlesscoder
Copy link
Author

No, I won't find the time for this any time soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community This is a good first issue for contributing scope: misc Misc issues type: feature
Projects
None yet
Development

No branches or pull requests

4 participants