MCPcopy
hub / github.com/desktop/desktop / handleError

Function handleError

script/validate-electron-version.ts:29–37  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

27const errorOnMismatch = (process.env.RELEASE_CHANNEL ?? '').length > 0
28
29function handleError(message: string): never {
30 if (errorOnMismatch) {
31 console.error(message)
32 process.exit(1)
33 } else {
34 console.warn(message)
35 process.exit(0)
36 }
37}
38
39const channel =
40 process.env.RELEASE_CHANNEL || distInfo.getChannelFromReleaseBranch()

Callers 2

Calls 2

errorMethod · 0.80
warnMethod · 0.80

Tested by

no test coverage detected