diff --git a/automation/run.ts b/automation/run.ts index 45921a2b..eeb33d73 100644 --- a/automation/run.ts +++ b/automation/run.ts @@ -31,7 +31,6 @@ import { fixPathForMsys, ROOT, runUnderMsys } from './utils'; function exitWithError(error: Error | string): never { console.error(`Error: ${error}`); process.exit(1); - throw error; // to please the Typescript compiler } /** diff --git a/lib/app-common.ts b/lib/app-common.ts index a8ccdbe8..cffbda63 100644 --- a/lib/app-common.ts +++ b/lib/app-common.ts @@ -58,7 +58,7 @@ function setupRaven() { release: require('../package.json').version, }).install(function(_logged: any, error: Error) { console.error(error); - return process.exit(1); + process.exit(1); }); Raven.setContext({ diff --git a/lib/utils/patterns.ts b/lib/utils/patterns.ts index 640aaa5e..a8e03a1d 100644 --- a/lib/utils/patterns.ts +++ b/lib/utils/patterns.ts @@ -454,6 +454,4 @@ export function exitWithExpectedError(message: string | Error): never { printErrorMessage(message); process.exit(1); - // The following throw is to make tsc happy about the `never` return type. - throw new Error('exit'); }