Closed SamVerschueren closed 8 years ago
appname
is defined here. It uses the names from bower/package.json or default to the folder name here https://github.com/yeoman/generator/blob/master/lib/base.js#L765
It's correct on the second run because there's probably a config file containing the name.
My guess is under your plugin, path.basename(this.destinationRoot());
doesn't return what we expect.
Alright, I found the problem. The first time the environment was created, the cwd
path was not set correctly. So when debugging that https://github.com/yeoman/generator/blob/master/lib/base.js#L765 method, I found out that the destinationRoot()
returned /
. Thanks for pointing me in that direction!
generator-nm
usesthis.appname
as default application name. The first time the generator is executed, the app name is empty. When quitting the generator (by pressing escape) and runninggenerator-nm
again, the app name is correct.The adapter is just getting the question here.
When I put a breakpoint here, the first question in the array is
The second time I run the generator, the default value is correct.
Any idea how this is possible? @sindresorhus @SBoudrias