mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Only inherit io when loglevel verbose
This commit is contained in:
parent
22580bcf5f
commit
6006760b67
1 changed files with 8 additions and 3 deletions
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue