mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-30 08:03:55 +00:00
Remove unnecessary code now that typescript understands process.exit
Change-type: patch
This commit is contained in:
parent
1417875110
commit
27e1f3f7d7
@ -31,7 +31,6 @@ import { fixPathForMsys, ROOT, runUnderMsys } from './utils';
|
|||||||
function exitWithError(error: Error | string): never {
|
function exitWithError(error: Error | string): never {
|
||||||
console.error(`Error: ${error}`);
|
console.error(`Error: ${error}`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
throw error; // to please the Typescript compiler
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,7 +58,7 @@ function setupRaven() {
|
|||||||
release: require('../package.json').version,
|
release: require('../package.json').version,
|
||||||
}).install(function(_logged: any, error: Error) {
|
}).install(function(_logged: any, error: Error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
Raven.setContext({
|
Raven.setContext({
|
||||||
|
@ -454,6 +454,4 @@ export function exitWithExpectedError(message: string | Error): never {
|
|||||||
|
|
||||||
printErrorMessage(message);
|
printErrorMessage(message);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
// The following throw is to make tsc happy about the `never` return type.
|
|
||||||
throw new Error('exit');
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user