From 4b12678ca39973789da9de28b60d80a947019a62 Mon Sep 17 00:00:00 2001 From: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Sun, 24 Nov 2024 22:17:27 +0100 Subject: [PATCH] bench: Use `agave-install` if Solana is v2 (#3383) --- tests/bench/scripts/utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/bench/scripts/utils.ts b/tests/bench/scripts/utils.ts index ec52c297a4..18050ade49 100644 --- a/tests/bench/scripts/utils.ts +++ b/tests/bench/scripts/utils.ts @@ -498,7 +498,12 @@ export class VersionManager { const activeVersion = this.#getSolanaVersion(); if (activeVersion === version) return; - spawn("solana-install", ["init", version], { + // `solana-install` is renamed to `agave-install` in Solana v2 + // https://github.com/anza-xyz/agave/wiki/Agave-Transition + const cmdName = activeVersion.startsWith("2") + ? "agave-install" + : "solana-install"; + spawn(cmdName, ["init", version], { logOutput: true, throwOnError: { msg: `Failed to set Solana version to ${version}` }, });