Skip to content

Commit 43b2ef6

Browse files
remove error in semver parse
1 parent 8d2cdf5 commit 43b2ef6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/workflow/src/flags.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,13 @@ function isCompared(compare: SemVer, comparison: -1 | 0 | 1, missingDefault: boo
156156
function parseSemver(version: string): SemVer | undefined {
157157
const matches = version.match(/(\d+)\.(\d+)\.(\d+)/);
158158
if (!matches) return undefined;
159-
const [full, major, minor, patch] = matches.map((digits) => {
159+
const [_full, major, minor, patch] = matches.map((digits) => {
160160
try {
161161
return Number.parseInt(digits);
162162
} catch {
163163
return undefined;
164164
}
165165
});
166-
if (major === undefined || minor === undefined || patch === undefined)
167-
throw new Error(`full: ${full}, parts: ${major}.${minor}.${patch}`);
168166
if (major === undefined || minor === undefined || patch === undefined) return undefined;
169167
return {
170168
major,

0 commit comments

Comments
 (0)