Skip to content

Commit

Permalink
Set the exit code to 1 when an error is thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
alcuadrado committed Oct 30, 2024
1 parent 3a5eec2 commit b1030da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion v-next/hardhat/src/internal/cli/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import { createHardhatRuntimeEnvironment } from "../hre-intialization.js";
import { printErrorMessages } from "./error-handler.js";
import { getGlobalHelpString } from "./helpers/getGlobalHelpString.js";
import { getHelpString } from "./helpers/getHelpString.js";
import { printNodeJsVersionWarningIfNecessary } from "./node-version.js";
import { ensureTelemetryConsent } from "./telemetry/telemetry-permissions.js";
import { printVersionMessage } from "./version.js";
import { printNodeJsVersionWarningIfNecessary } from "./node-version.js";

export interface MainOptions {
print?: (message: string) => void;
Expand Down Expand Up @@ -179,6 +179,8 @@ export async function main(
if (options.rethrowErrors) {
throw error;
}

process.exitCode = 1;
}
}

Expand Down

0 comments on commit b1030da

Please sign in to comment.