diff --git a/src/extension.ts b/src/extension.ts index 2e5b7d7..ebd86d3 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -41,15 +41,10 @@ export async function activate(context: vscode.ExtensionContext): Promise try { // GET binary path const globalConfig = GlobalConfig.getInstance(); - const kaniBinaryPath = await getKaniPath('cargo-kani'); - globalConfig.setFilePath(kaniBinaryPath); - - vscode.window.showInformationMessage( - `Kani located at ${kaniBinaryPath} being used for verification`, - ); - - // GET Version number and display to user - await getKaniVersion(globalConfig.getFilePath()); + const CargoKaniBinaryPath = await getKaniPath('cargo-kani'); + const KaniPath = await getKaniPath('kani'); + globalConfig.setFilePath(CargoKaniBinaryPath); + globalConfig.setKanifilePath(KaniPath); } catch (error) { showErrorWithReportIssueButton( 'The Kani executable was not found in PATH. Please install it using the instructions at https://model-checking.github.io/kani/install-guide.html and/or make sure it is in your PATH.', diff --git a/src/globalConfig.ts b/src/globalConfig.ts index 00270ef..d0a02d4 100644 --- a/src/globalConfig.ts +++ b/src/globalConfig.ts @@ -1,11 +1,13 @@ // Copyright Kani Contributors // SPDX-License-Identifier: Apache-2.0 OR MIT class GlobalConfig { - private static instance: GlobalConfig; - private filePath: string; + public static instance: GlobalConfig; + public filePath: string; + public KanifilePath = ''; private constructor() { this.filePath = ''; + this.KanifilePath = ''; } public static getInstance(): GlobalConfig { @@ -22,6 +24,14 @@ class GlobalConfig { public getFilePath(): string { return this.filePath; } + + public setKanifilePath(filePath: string): void { + this.KanifilePath = filePath; + } + + public getKanifilePath() { + return this.KanifilePath; + } } export default GlobalConfig;