Skip to content

Commit

Permalink
Updated module check for modules containing a number in their ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Fgerthoffert committed Mar 31, 2021
1 parent b38932a commit d63138b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/modules/install/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ const installModule = async (
}
return false
})
.map((f) => {
const versionCoerce = semver.coerce(f)
.map((f) => {
let versionParse = path.basename(f)
if (moduleId !== undefined) {
versionParse = f.replace(moduleId,'')
}
const versionCoerce = semver.coerce(versionParse)
return {
moduleId,
moduleVersion: versionCoerce === null ? null: versionCoerce.version,
Expand Down

0 comments on commit d63138b

Please sign in to comment.