Merge pull request #24621 from backstage/repo-fix-windows-fix

repo fix command incorrect workspace property on windows
This commit is contained in:
Patrik Oldsberg
2024-05-03 18:05:27 +02:00
committed by GitHub
2 changed files with 7 additions and 6 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Fixed an issue causing the `repo fix` command to set an incorrect `workspace` property using Windows
+2 -6
View File
@@ -22,11 +22,7 @@ import {
} from '@backstage/cli-node';
import { OptionValues } from 'commander';
import fs from 'fs-extra';
import {
resolve as resolvePath,
join as joinPath,
relative as relativePath,
} from 'path';
import { resolve as resolvePath, posix, relative as relativePath } from 'path';
import { paths } from '../../lib/paths';
/**
@@ -205,7 +201,7 @@ export function createRepositoryFieldFixer() {
const rootDir = rootRepoField.directory || '';
return (pkg: FixablePackage) => {
const expectedPath = joinPath(
const expectedPath = posix.join(
rootDir,
relativePath(paths.targetRoot, pkg.dir),
);