From d0800aa2001a4004af5eeb3e7f5ef0ca98fd53ab Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Fri, 2 Aug 2019 14:23:11 -0700 Subject: [PATCH] test: report hexadecimal status codes on windows (#19597) --- script/spec-runner.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/spec-runner.js b/script/spec-runner.js index 309c2e9ca18..abf54745152 100755 --- a/script/spec-runner.js +++ b/script/spec-runner.js @@ -123,7 +123,8 @@ async function runRemoteBasedElectronTests () { stdio: 'inherit' }) if (status !== 0) { - throw new Error(`Electron tests failed with code ${status}.`) + const textStatus = process.platform === 'win32' ? `0x${status.toString(16)}` : status.toString() + throw new Error(`Electron tests failed with code ${textStatus}.`) } } @@ -135,7 +136,8 @@ async function runMainProcessElectronTests () { stdio: 'inherit' }) if (status !== 0) { - throw new Error(`Electron tests failed with code ${status}.`) + const textStatus = process.platform === 'win32' ? `0x${status.toString(16)}` : status.toString() + throw new Error(`Electron tests failed with code ${textStatus}.`) } }