cli: throw error on non zero result during install

This commit is contained in:
Koushik Dutta
2022-12-06 07:59:03 -08:00
parent d8832beaf5
commit bf5b90dc2c
3 changed files with 5 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "scrypted",
"version": "1.0.56",
"version": "1.0.57",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "scrypted",
"version": "1.0.56",
"version": "1.0.57",
"license": "ISC",
"dependencies": {
"@scrypted/types": "^0.0.6",

View File

@@ -1,6 +1,6 @@
{
"name": "scrypted",
"version": "1.0.56",
"version": "1.0.57",
"description": "",
"main": "./dist/packages/cli/src/main.js",
"bin": {

View File

@@ -23,6 +23,8 @@ async function runCommand(command: string, ...args: string[]) {
stdio: 'inherit'
});
await once(cp, 'exit');
if (cp.exitCode)
throw new Error(`${command} exited with non zero result ${cp.exitCode}`);
}
async function runCommandEatError(command: string, ...args: string[]) {