Skip to content

Commit

Permalink
accept suggested chnages
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarakaprasad committed Mar 12, 2024
1 parent 9f66071 commit 632b2b3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions testing/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,14 @@ class JHipsterRunContext extends RunContext<GeneratorTestType> {
/**
* Lookup generators at generator-jhipster's parent at a npm repository
* @param lookups generators relative folder
* @param packagePath overriden package path for the blueprint
* @returns
*/
withParentBlueprintLookup(lookups = ['generators'], packagePath?: string | [string]): this {
withParentBlueprintLookup(lookups = ['generators']): this {
const packageRootParent = join(getPackageRoot(), '..');
if (basename(packageRootParent) === 'node_modules') {
this.withLookups([{ packagePaths: [join(packageRootParent, '..')], lookups }] as any);
} else if (packagePath) {
this.withLookups([{ packagePaths: Array.isArray(packagePath) ? packagePath : [packagePath], lookups }] as any);
} else {
this.withLookups([{ packagePaths: [process.cwd()], lookups }] as any);
}
return this;
}
Expand Down

0 comments on commit 632b2b3

Please sign in to comment.