Skip to content

Commit

Permalink
fix: only use the semver version number without a suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Oct 4, 2024
1 parent dfa2fa1 commit 62e8ec0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/utils/get-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ export function getVersion(command: string, regex: RegExp): string | undefined {
}

export function getVersionAnchor(): string | undefined {
return getVersion('anchor --version', /anchor-cli (.*)/)
return getVersion('anchor --version', /anchor-cli (\d+\.\d+\.\d+)/)
}

export function getVersionSolana(): string | undefined {
return getVersion('solana --version', /solana-cli (.*)/)
return getVersion('solana --version', /solana-cli (\d+\.\d+\.\d+)/)
}

export function getVersionRust(): string | undefined {
return getVersion('rustc --version', /rustc (.*)/)
return getVersion('rustc --version', /rustc (\d+\.\d+\.\d+)/)
}
export function getVersionAvm(): string | undefined {
return getVersion('avm --version', /avm (.*)/)
return getVersion('avm --version', /avm (\d+\.\d+\.\d+)/)
}
1 change: 0 additions & 1 deletion src/utils/vendor/package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export function detectInvokedPackageManager(): PackageManager {

for (const pkgManager of packageManagers) {
if (invoker.path.includes(pkgManager)) {
console.log(`Found ${pkgManager}`)
detectedPackageManager = pkgManager
break
}
Expand Down

0 comments on commit 62e8ec0

Please sign in to comment.