diff --git a/src/api/checkCompatibility.ts b/src/api/checkCompatibility.ts index 874d5a2308..16fef07b34 100644 --- a/src/api/checkCompatibility.ts +++ b/src/api/checkCompatibility.ts @@ -67,6 +67,10 @@ export default function checkCompatibility ( modulesPath: string, } ) { + // Important: comparing paths with path.relative() + // is the only way to compare paths correctly on Windows + // as of Node.js 4-9 + // See related issue: https://github.com/pnpm/pnpm/issues/996 if (path.relative(modules.store, opts.storePath) !== '') { throw new UnexpectedStoreError({ expectedStorePath: modules.store,