From d23a34687f954dc87752cb1b43866f0f9ab0149d Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 17 May 2024 16:32:38 +0100 Subject: [PATCH 1/2] Quick fix for the CLI - the disabling of pino logging being part of the index means it doesn't run until after TS imports - moving it to be first import/ran before all else. --- packages/cli/src/environment.ts | 1 + packages/cli/src/index.ts | 3 ++- packages/cli/start.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/environment.ts b/packages/cli/src/environment.ts index 9d017f99b2..51f6e9b972 100644 --- a/packages/cli/src/environment.ts +++ b/packages/cli/src/environment.ts @@ -1,3 +1,4 @@ +process.env.DISABLE_PINO_LOGGER = "1" process.env.NO_JS = "1" process.env.JS_BCRYPT = "1" process.env.DISABLE_JWT_WARNING = "1" diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 86a6d2b7b3..23a2447ad6 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,5 +1,6 @@ #!/usr/bin/env node -process.env.DISABLE_PINO_LOGGER = "1" +// have to import this before anything else +import "./init" import "./environment" import { getCommands } from "./options" import { Command } from "commander" diff --git a/packages/cli/start.sh b/packages/cli/start.sh index 9650f0bbfa..ae39f73753 100755 --- a/packages/cli/start.sh +++ b/packages/cli/start.sh @@ -1,3 +1,3 @@ #!/bin/bash dir="$(dirname -- "$(readlink -f "${BASH_SOURCE}")")" -${dir}/node_modules/ts-node/dist/bin.js ${dir}/src/index.ts $@ +${dir}/../../node_modules/ts-node/dist/bin.js ${dir}/src/index.ts $@ From 5d1c23373f347a1a137624e27b77856294b85ef0 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 17 May 2024 16:32:55 +0100 Subject: [PATCH 2/2] removing init import. --- packages/cli/src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 23a2447ad6..317ccea974 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,6 +1,5 @@ #!/usr/bin/env node // have to import this before anything else -import "./init" import "./environment" import { getCommands } from "./options" import { Command } from "commander"