Skip to content

Commit b250b01

Browse files
committed
Fix logic error in pnpm version and lockfile version check
1 parent 9c6c711 commit b250b01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/pnpm-sync-lib/src/pnpmSyncPrepare.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export async function pnpmSyncPrepareAsync(options: IPnpmSyncPrepareOptions): Pr
220220
const pnpmVersion: string | undefined = pnpmModulesYaml?.packageManager?.split('@')[1];
221221

222222
// currently, only support pnpm v8
223-
if (!pnpmVersion || !(pnpmVersion.startsWith('8') || !pnpmVersion.startsWith('9'))) {
223+
if (!pnpmVersion || !(pnpmVersion.startsWith('8') || pnpmVersion.startsWith('9'))) {
224224
logMessageCallback({
225225
message: `The pnpm version is not supported; pnpm-sync requires pnpm version 8.x, 9.x`,
226226
messageKind: LogMessageKind.ERROR,
@@ -243,7 +243,7 @@ export async function pnpmSyncPrepareAsync(options: IPnpmSyncPrepareOptions): Pr
243243
if (
244244
!pnpmLockfile ||
245245
!lockfileVersion ||
246-
!(lockfileVersion.startsWith('6') || !lockfileVersion.startsWith('9'))
246+
!(lockfileVersion.startsWith('6') || lockfileVersion.startsWith('9'))
247247
) {
248248
logMessageCallback({
249249
message: `The pnpm-lock.yaml format is not supported; pnpm-sync requires lockfile version 6, 9`,

0 commit comments

Comments
 (0)