From ab1c97507c3c4125019b21fc108b77141a1c3e96 Mon Sep 17 00:00:00 2001 From: Eric Doughty-Papassideris Date: Thu, 28 Mar 2024 01:58:10 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20CLI:=20preserve=20exit=20code=20?= =?UTF-8?q?when=20running=20via=20`npm=20run`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdrive/backend/node/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrive/backend/node/package.json b/tdrive/backend/node/package.json index 3b354f95..598284df 100644 --- a/tdrive/backend/node/package.json +++ b/tdrive/backend/node/package.json @@ -10,7 +10,7 @@ "build:copy-config": "cp -R config dist", "build:copy-templates": "cpy src/**/*.eta dist/", "build:watch": "npm run build:clean && npm run build:copy-assets && tsc-watch --project . --noClear --outDir ./dist", - "cli": "__tdcli() { bin/twake-cli \"$@\" | pino-pretty ; } ; __tdcli", + "cli": "__tdcli() { set -o pipefail ; bin/twake-cli \"$@\" | pino-pretty ; } ; __tdcli", "dev": "tsc-watch --project . --noClear --outDir ./dist --onSuccess \"nodemon ./dist/server.js\" | pino-pretty", "dev:cli": "tsc-watch --project . --noClear --outDir ./dist --onSuccess \"nodemon ./dist/cli/index.js workspace user\" | pino-pretty", "dev:cli-dry": "tsc-watch --project . --noClear --outDir ./dist --onSuccess \"nodemon ./dist/cli/index.js console merge --dry\" | pino-pretty",