diff --git a/src/services/marketplace/MarketplaceManager.ts b/src/services/marketplace/MarketplaceManager.ts index fca67ee516..78f6400c11 100644 --- a/src/services/marketplace/MarketplaceManager.ts +++ b/src/services/marketplace/MarketplaceManager.ts @@ -15,7 +15,7 @@ import { getUserLocale } from "./utils" import { GlobalFileNames } from "src/shared/globalFileNames" import { TerminalRegistry } from "src/integrations/terminal/TerminalRegistry" import { assertsMpContext, createHookable, MarketplaceContext, registerMarketplaceHooks } from "roo-rocket" -import { unpackFromUint8 } from "config-rocket/cli" +import { assertsBinarySha256, unpackFromUint8 } from "config-rocket/cli" import { uint8IsConfigPackWithParameters } from "config-rocket/cli" /** @@ -601,6 +601,7 @@ export class MarketplaceManager { assertsMpContext(mpContext) const binaryUint8 = await fetchBinary(item.binaryUrl) + await assertsBinarySha256(binaryUint8, item.binaryHash) // Install via CLI if binary is a configurable pack. // TODO: think of a way to send the binary to the npx process @@ -617,7 +618,7 @@ export class MarketplaceManager { ) terminalClass.terminal.show() await terminalClass.runCommand( - `npx --yes roo-rocket@latest --mp="${JSON.stringify(mpContext).replaceAll(/"/g, '\\"')}" --cwd="${cwd}" --sha256="${item.binaryHash}" --url="${item.binaryUrl}"`, + `npx --yes roo-rocket@latest --mp="${JSON.stringify(mpContext).replaceAll(/"/g, '\\"')}" --cwd="${cwd}" --url="${item.binaryUrl}"`, { onLine: (line) => { pResult.push(line) @@ -651,7 +652,6 @@ export class MarketplaceManager { await unpackFromUint8(binaryUint8, { hookable: customHookable, nonAssemblyBehavior: true, - sha256: item.binaryHash, cwd, }) vscode.window.showInformationMessage(`"${item.name}" installed successfully`)