diff --git a/.changeset/pretty-pets-deliver.md b/.changeset/pretty-pets-deliver.md new file mode 100644 index 0000000000..dc87690148 --- /dev/null +++ b/.changeset/pretty-pets-deliver.md @@ -0,0 +1,5 @@ +--- +'yarn-plugin-backstage': minor +--- + +Fixed windows path resolution on windows diff --git a/packages/yarn-plugin/src/util.ts b/packages/yarn-plugin/src/util.ts index ee89a647e3..23ce55ac80 100644 --- a/packages/yarn-plugin/src/util.ts +++ b/packages/yarn-plugin/src/util.ts @@ -20,7 +20,7 @@ import { httpUtils, structUtils, } from '@yarnpkg/core'; -import { ppath, xfs } from '@yarnpkg/fslib'; +import { ppath, npath, xfs } from '@yarnpkg/fslib'; import { valid as semverValid } from 'semver'; import { BACKSTAGE_JSON, findPaths } from '@backstage/cli-common'; import { getManifestByVersion } from '@backstage/release-manifests'; @@ -28,7 +28,9 @@ import { getManifestByVersion } from '@backstage/release-manifests'; import { PROTOCOL } from './constants'; export const getCurrentBackstageVersion = () => { - const workspaceRoot = ppath.resolve(findPaths(ppath.cwd()).targetRoot); + const workspaceRoot = npath.toPortablePath( + findPaths(npath.fromPortablePath(ppath.cwd())).targetRoot, + ); const backstageJson = xfs.readJsonSync( ppath.join(workspaceRoot, BACKSTAGE_JSON),