Skip to content

Commit d58e4bf

Browse files
authored
fix(align-deps): fix root workspace being checked twice (#4094)
1 parent 0bf51d8 commit d58e4bf

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.changeset/easy-pillows-tease.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rnx-kit/align-deps": patch
3+
---
4+
5+
Fixed root workspace being checked twice depending on configuration

packages/align-deps/src/cli.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ async function getManifests(
145145
const allPackages = (await findWorkspacePackages()).map((p) =>
146146
path.join(path.relative(cwd, p), "package.json")
147147
);
148-
allPackages.push(manifestPath);
148+
// Add the root workspace if it isn't there
149+
if (!allPackages.includes(manifestPath)) {
150+
allPackages.push(manifestPath);
151+
}
149152
return allPackages;
150153
} catch (e) {
151154
if (hasProperty(e, "message")) {

0 commit comments

Comments
 (0)