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

CLI crashes if git username and email isn't specified #231

Open
akd-io opened this issue May 28, 2023 · 1 comment
Open

CLI crashes if git username and email isn't specified #231

akd-io opened this issue May 28, 2023 · 1 comment
Assignees
Labels
bug Something isn't working package: cli Related to the "create-next-stack" cli package
Milestone

Comments

@akd-io
Copy link
Owner

akd-io commented May 28, 2023

I believe the CLI crashes if the user hasn't set their username and email in the git config, when the cli tries to create the initial commit.

I think create-next-app handles this case without problems, just ignoring git.
We should probably check for user.name and email before amending create-next-app with our initial commit.

Get username with git config --global user.name
Get email with git config --global user.email
Set username with git config --global user.name "example user name"
Set email with git config --global user.email "[email protected]"

@akd-io akd-io added bug Something isn't working package: cli Related to the "create-next-stack" cli package labels May 28, 2023
@akd-io akd-io self-assigned this May 28, 2023
@akd-io
Copy link
Owner Author

akd-io commented May 28, 2023

I think create-next-app handles this case without problems, just ignoring git.

Doesn't seem to be the case according to this line in test.ts:

// If not done already, Set Git name and email so `git commit` doesn't fail during create-next-app
await setGitNameAndEmail()

Research and fix any problems that arise

@akd-io akd-io added this to the Release 1.0.0 milestone May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package: cli Related to the "create-next-stack" cli package
Projects
None yet
Development

No branches or pull requests

1 participant