From 4d15444275f26bedf4037bad5c93f73c7aa48cd5 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Fri, 3 May 2024 16:47:25 +0200 Subject: [PATCH 1/2] cli: fix repo fix workspace path on windows Signed-off-by: Vincenzo Scamporlino --- packages/cli/src/commands/repo/fix.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/commands/repo/fix.ts b/packages/cli/src/commands/repo/fix.ts index b975203a73..049f5a8416 100644 --- a/packages/cli/src/commands/repo/fix.ts +++ b/packages/cli/src/commands/repo/fix.ts @@ -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), ); From cc3c51833bf48731751d435b21a341964deb2ad4 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Fri, 3 May 2024 16:54:18 +0200 Subject: [PATCH 2/2] cli: repo fix changeset Signed-off-by: Vincenzo Scamporlino --- .changeset/slimy-kids-behave.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/slimy-kids-behave.md diff --git a/.changeset/slimy-kids-behave.md b/.changeset/slimy-kids-behave.md new file mode 100644 index 0000000000..5e635878ff --- /dev/null +++ b/.changeset/slimy-kids-behave.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Fixed an issue causing the `repo fix` command to set an incorrect `workspace` property using Windows