Skip to content

Commit 32bec2a

Browse files
fix(core): add globPatternforDependencies support nx:run-commands wi… (#12786)
Fixes #12721
1 parent 37c8483 commit 32bec2a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/workspace/src/utilities/generate-globs.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@ export function createGlobPatternsForDependencies(
5454

5555
const dirsToUse = [];
5656
const recursiveScanDirs = (dirPath) => {
57-
const children = readdirSync(dirPath);
57+
const children = readdirSync(resolve(workspaceRoot, dirPath));
5858
for (const child of children) {
5959
const childPath = join(dirPath, child);
60-
if (ig?.ignores(childPath) || !lstatSync(childPath).isDirectory()) {
60+
if (
61+
ig?.ignores(childPath) ||
62+
!lstatSync(resolve(workspaceRoot, childPath)).isDirectory()
63+
) {
6164
continue;
6265
}
63-
if (existsSync(join(childPath, 'ng-package.json'))) {
66+
if (existsSync(join(workspaceRoot, childPath, 'ng-package.json'))) {
6467
dirsToUse.push(childPath);
6568
} else {
6669
recursiveScanDirs(childPath);

0 commit comments

Comments
 (0)