Skip to content

Commit

Permalink
dont force yarn when using local boilerplate
Browse files Browse the repository at this point in the history
fix the issue by removing .git from node_modules/ignite-jhipster
  • Loading branch information
ruddell committed Jul 24, 2019
1 parent 66ee637 commit d1f661c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/boilerplate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ async function install (context) {

// does the user want to use yarn?
let useNpm = !parameters.options.yarn
// `npm i` fails due to symlinks, so if the developer is using this boilerplate from a local directory, yarn is forced
if (context.parameters.options.boilerplate !== 'ignite-jhipster' && context.parameters.options.boilerplate !== 'jhipster') {
useNpm = false
}
ignite.useYarn = !useNpm

// if the user is passing in JDL
Expand Down Expand Up @@ -286,6 +282,10 @@ async function install (context) {
print.info(print.colors.bold(` cd ${name}`))
print.info(print.colors.bold(' ignite generate'))
print.info('')
if (useNpm && context.parameters.options.boilerplate !== 'ignite-jhipster' && context.parameters.options.boilerplate !== 'jhipster') {
print.warning('NOTE: Using local ignite-jhipster, removing `.git` folder from `node_modules/ignite-jhipster` to prevent issues with `npm i`')
await rimraf.sync('../node_modules/ignite-jhipster/.git')
}
}

module.exports = {
Expand Down

0 comments on commit d1f661c

Please sign in to comment.