Open jorgecasar opened 8 years ago
I have not tried using this this a yeoman generator yet. Did you make sure to CD into the directory with the project? You don't show it in the steps above so I just want to make sure.
Yes, I'm in the project folder. Yeoman must be executed in a empty folder and it becomes the root folder.
All the command showed in the example was executed in the root of the project.
@jorgecasar Were you able to find anything more about why this was happening? I don't have the bandwidth to investigate further but am curious as to why that would happen.
@jimthedev I don't know how it happens. I spent some time reading yeoman generator for Polymer and cz-cli code but I couldn't find anything. I will try with other generator to discard options.
The full process to reproduce the error is:
$ npm install -g yo
$ npm install -g generator-polymer
$ mkdir -p my-project && cd $_
$ yo polymer
$ commitizen init cz-conventional-changelog --save --save-exact
$ git add .
$ git cz
And after answer all the cz
questions it start the yeoman script instead of cz
one.
Try the following change in your process (note I added just one line, git init):
$ npm install -g yo
$ npm install -g generator-polymer
$ mkdir -p my-project && cd $_
$ yo polymer
$ git init
$ commitizen init cz-conventional-changelog --save --save-exact
$ git add .
$ git cz
Looks like yeoman doesn't actually initialize a git repo for you so you probably need to do it yourself using git init as I showed above.
cc @jorgecasar
HI,
It seems that the question prompt callback it isn't called. Instead of the cz script it calls again the yeoman question prompt callback.
Hi,
Could you upload this all in a zip or post a link to a repo? I am using the steps you provided and as long as I run git init properly in the process I am unable to reproduce.
I installed and configured the cz-cli into a git project generated by yeoman (yeoman polymer).
Running
git cz
works fine until after the last questions that lunch yeoman generator. Here is an example of the process: