This commit is contained in:
Sander Declerck 2026-05-08 14:42:52 +00:00 committed by GitHub
commit d37773aecc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 109 additions and 1 deletions

View file

@ -8,6 +8,7 @@ import { ui } from "../../environment/userInteraction.js";
import { getLoggingLevel, LOGGING_VERBOSE } from "../../config/settings.js";
import { getReportingServer } from "./reportingServer.js";
import EventEmitter from "node:events";
import { createAikidoEndpointConfigFile } from "./createAikidoEndpointConfigFile.js";
const readFilePromise = promisify(readFile);
@ -104,7 +105,7 @@ export function createRamaProxy(ramaPath) {
* @returns {Promise<RamaProxyInstance>}
*/
async function startRama(ramaPath, dataFolder, reportingUrl) {
const startTime = Date.now();
const startTime = Date.now();
const args = [
"--secrets",
"memory",
@ -113,6 +114,12 @@ async function startRama(ramaPath, dataFolder, reportingUrl) {
"--reporting-endpoint",
reportingUrl,
];
const configFile = await createAikidoEndpointConfigFile(dataFolder);
if (configFile) {
args.push("--config-file", configFile);
}
const stdio = getLoggingLevel() === LOGGING_VERBOSE ? "inherit" : "pipe";
const process = spawn(ramaPath, args, { stdio: stdio });