Only inherit io when loglevel verbose

This commit is contained in:
Sander Declerck 2026-01-12 15:39:26 +01:00
parent 22580bcf5f
commit 6006760b67
No known key found for this signature in database

View file

@ -5,6 +5,7 @@ import { tmpdir } from "node:os";
import { dirname, join } from "node:path"; import { dirname, join } from "node:path";
import { promisify } from "node:util"; import { promisify } from "node:util";
import { ui } from "../environment/userInteraction.js"; import { ui } from "../environment/userInteraction.js";
import { getLoggingLevel, LOGGING_VERBOSE } from "../config/settings.js";
const readFilePromise = promisify(readFile); const readFilePromise = promisify(readFile);
const writeFilePromise = promisify(writeFile); const writeFilePromise = promisify(writeFile);
@ -72,9 +73,13 @@ export function createRamaProxy(ramaPath) {
* @returns {Promise<RamaProxyInstance>} * @returns {Promise<RamaProxyInstance>}
*/ */
async function startRama(ramaPath, dataFolder) { async function startRama(ramaPath, dataFolder) {
let process = spawn(ramaPath, ["--secrets", "memory", "--data", dataFolder], { const args = ["--secrets", "memory", "--data", dataFolder];
stdio: "inherit", const process =
}); getLoggingLevel() === LOGGING_VERBOSE
? spawn(ramaPath, args, {
stdio: "inherit",
})
: spawn(ramaPath, args);
// wait some time to allow the proxy process to start // wait some time to allow the proxy process to start
await new Promise((resolve) => setTimeout(resolve, 5000)); await new Promise((resolve) => setTimeout(resolve, 5000));