diff --git a/src/utils/get-version.ts b/src/utils/get-version.ts index afcf75c..4f902fd 100644 --- a/src/utils/get-version.ts +++ b/src/utils/get-version.ts @@ -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+)/) }