Skip to content

Commit 0b96770

Browse files
committed
fix: less spam when compilation fails
1 parent d1aa218 commit 0b96770

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hardhat-plugin-noir",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Hardhat plugin for Noir language",
55
"repository": "github:olehmisar/hardhat-noir",
66
"author": "Oleh Misarosh <[email protected]>",

src/utils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { HardhatPluginError } from "hardhat/plugins";
2+
13
export const PLUGIN_NAME = "hardhat-plugin-noir";
24

35
export const makeRunCommand = (cwd?: string) => async (command: string) => {
@@ -19,6 +21,9 @@ export const makeRunCommand = (cwd?: string) => async (command: string) => {
1921
} catch (error) {
2022
console.error(`Error executing command: ${command}`);
2123
console.error((error as any).stderr || (error as any).message); // Log only error messages
22-
throw error;
24+
throw new HardhatPluginError(
25+
PLUGIN_NAME,
26+
`Error executing command: ${command}`,
27+
);
2328
}
2429
};

0 commit comments

Comments
 (0)