Skip to content

Commit 3beccb4

Browse files
author
Craigory Coppola
committed
fix(core): dep-graph with various directory separators
MacOS / Linux use different directory separators, and we relied on it being a forward slash. fixes #43
1 parent 3037943 commit 3beccb4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/core/src/generators/utils/generate-project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function normalizeOptions(
6363

6464
const npmScope = names(readWorkspaceConfiguration(host).npmScope).className;
6565
const featureScope = projectDirectory
66-
.split('/')
66+
.split(/(\/|\\)/gm)
6767
.map((part) => names(part).className);
6868
const namespaceName = [npmScope, ...featureScope].join('.');
6969

packages/utils/src/lib/utility-functions/workspace.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from '@nrwl/devkit';
88

99
import { readFileSync } from 'fs';
10-
import { isAbsolute, resolve } from 'path';
10+
import { isAbsolute, resolve, dirname } from 'path';
1111
import { XmlDocument, XmlElement } from 'xmldoc';
1212

1313
import { NXDOTNET_TAG } from '../constants';
@@ -58,7 +58,7 @@ export function getDependantProjectsForNxProject(
5858
absoluteFilePath = includeFilePath;
5959
} else {
6060
absoluteFilePath = resolve(
61-
netProjectFilePath.split('/').slice(0, -1).join('/'),
61+
dirname(netProjectFilePath),
6262
includeFilePath,
6363
);
6464
}

0 commit comments

Comments
 (0)