Skip to content

Commit

Permalink
Tweaks suggested by jaisnan
Browse files Browse the repository at this point in the history
  • Loading branch information
zhassan-aws committed May 17, 2023
1 parent 689c2fd commit e47a666
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
if (!checkCargoExist()) {
showErrorWithReportIssueButton('Cannot find Cargo.toml to run Cargo Kani on crate');
}
getKaniPath('cargo-kani').catch((error) => {
try {
// GET binary path
const kaniBinaryPath = await getKaniPath('cargo-kani');
} 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.',
'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.',
);
return new Promise((resolve, reject) => {
reject(new Error(`Failed to launch Kani extension`));
});
});
return;
}

const controller: vscode.TestController = vscode.tests.createTestController(
'Kani Proofs',
Expand Down

0 comments on commit e47a666

Please sign in to comment.