Skip to content

Commit 52c2340

Browse files
Copilotdmichon-msft
andcommitted
Use Path.convertToSlashes helper instead of manual path separator conversion
Co-authored-by: dmichon-msft <[email protected]>
1 parent b70d1a7 commit 52c2340

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/rush-lib/src/logic/selectors/PathProjectSelectorParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import * as nodePath from 'node:path';
55

6-
import { AlreadyReportedError } from '@rushstack/node-core-library';
6+
import { AlreadyReportedError, Path } from '@rushstack/node-core-library';
77
import type { LookupByPath } from '@rushstack/lookup-by-path';
88

99
import type { RushConfiguration } from '../../api/RushConfiguration';
@@ -32,7 +32,7 @@ export class PathProjectSelectorParser implements ISelectorParser<RushConfigurat
3232
const relativePath: string = nodePath.relative(this._rushConfiguration.rushJsonFolder, absolutePath);
3333

3434
// Normalize path separators to forward slashes for LookupByPath
35-
const normalizedPath: string = relativePath.split(nodePath.sep).join('/');
35+
const normalizedPath: string = Path.convertToSlashes(relativePath);
3636

3737
// Get the LookupByPath instance for the Rush root
3838
const lookupByPath: LookupByPath<RushConfigurationProject> =

0 commit comments

Comments
 (0)