nxpm / stack

🥭 nxpm-stack lets you generate a complete and opinionated full-stack application in a Nx Workspace, ready to extend and deploy!
https://npm.im/@nxpm/stack
MIT License
108 stars 14 forks source link

[@nxpm/cli] running nxpm-stack init fails when no global git identity is configured #101

Open beeman opened 3 years ago

beeman commented 3 years ago

Expected Behavior

Running nxpm-stack init should work if there are no global git identity.

Current Behavior

It fails because there is no global git identity

Error: Command failed: git checkout -B main && git add . && git commit -am "Initial commit of @nxpm/stack"
Switched to a new branch 'main'

*** 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.
image

Possible Solution

The CLI should check if these values exist. If not, it should set them with anonymous defaults.

Steps to Reproduce (for bugs)

  1. nxpm sandbox base run
  2. npm install -g @nxpm/cli
  3. nxpm-stack init --name sandbox