From c611f57d78fad3034f7e33b0f58099d43df9d7f9 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 20 Mar 2023 10:15:42 +0100 Subject: [PATCH] cli: tweak posix path fix Signed-off-by: Patrik Oldsberg --- .changeset/mighty-lamps-cross.md | 2 +- packages/cli/src/lib/bundler/config.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.changeset/mighty-lamps-cross.md b/.changeset/mighty-lamps-cross.md index 6819442105..af09263f2e 100644 --- a/.changeset/mighty-lamps-cross.md +++ b/.changeset/mighty-lamps-cross.md @@ -2,4 +2,4 @@ '@backstage/cli': patch --- -Use `posix` for joining paths instead of platform dependent joins. +Fixed backend start command on Windows by removing the use of platform dependent path joins. diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts index db98f1486f..6fc7482dce 100644 --- a/packages/cli/src/lib/bundler/config.ts +++ b/packages/cli/src/lib/bundler/config.ts @@ -39,7 +39,6 @@ import yn from 'yn'; import { readEntryPoints } from '../monorepo/entryPoints'; import { ExtendedPackage } from '../monorepo'; -const joinPath = posixPath.join; const BUILD_CACHE_ENV_VAR = 'BACKSTAGE_CLI_EXPERIMENTAL_BUILD_CACHE'; export function resolveBaseUrl(config: Config): URL { @@ -237,7 +236,7 @@ export async function createBackendConfig( const { packages } = await getPackages(cliPaths.targetDir); const localPackageEntryPoints = packages.flatMap(p => { const entryPoints = readEntryPoints((p as ExtendedPackage).packageJson); - return entryPoints.map(e => joinPath(p.packageJson.name, e.mount)); + return entryPoints.map(e => posixPath.join(p.packageJson.name, e.mount)); }); const moduleDirs = packages.map(p => resolvePath(p.dir, 'node_modules')); // See frontend config