Skip to content

Commit 5ae638f

Browse files
committed
Tweak regexp in extractOverridesFromPnpmLockSrc
1 parent a4d84f2 commit 5ae638f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/pnpm.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import type { SemVer } from 'semver'
1414

1515
export function extractOverridesFromPnpmLockSrc(lockfileContent: any): string {
1616
return typeof lockfileContent === 'string'
17-
? (/^overrides:(\r?\n {2}.+)+(?:\r?\n)*/m.exec(lockfileContent)?.[0] ?? '')
17+
? (/^overrides:\r?\n(?: {2}.+(?:\r?\n)*)+/m.exec(lockfileContent)?.[0] ??
18+
'')
1819
: ''
1920
}
2021

0 commit comments

Comments
 (0)