Skip to content

Commit

Permalink
fix(core): restore resolving generators and executors from __dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Dec 16, 2020
1 parent 793a918 commit da7e44f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/tao/src/shared/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class Workspaces {

private readExecutorsJson(nodeModule: string, executor: string) {
const packageJsonPath = require.resolve(`${nodeModule}/package.json`, {
paths: [this.root],
paths: [this.root, __dirname],
});
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString());
const executorsFile = packageJson.executors
Expand Down Expand Up @@ -203,13 +203,13 @@ export class Workspaces {
let generatorsFilePath;
if (collectionName.endsWith('.json')) {
generatorsFilePath = require.resolve(collectionName, {
paths: [this.root],
paths: [this.root, __dirname],
});
} else {
const packageJsonPath = require.resolve(
`${collectionName}/package.json`,
{
paths: [this.root],
paths: [this.root, __dirname],
}
);
const packageJson = JSON.parse(
Expand Down

0 comments on commit da7e44f

Please sign in to comment.