From 13aefaaa75787bf76a9b2e47efbf9bf37fef91f7 Mon Sep 17 00:00:00 2001 From: Julian Kiedaisch Date: Sun, 25 Oct 2026 11:05:55 +0000 Subject: [PATCH] fix(tools): read the live secrets from the home directory The measuring tool had /root/.filius-test.env written into it. The development environment is moving to a user of its own, so the path now comes from os.homedir() and follows whoever runs the tool. Co-Authored-By: Claude Opus 5 --- tools/live/lib.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/live/lib.ts b/tools/live/lib.ts index f21ec99..01697b0 100644 --- a/tools/live/lib.ts +++ b/tools/live/lib.ts @@ -1,8 +1,9 @@ // Measuring on test-filius: projects through the service, people through // tickets, the shared document through /sync, rooms through /sim. The -// secrets come from /root/.filius-test.env and are never printed. +// secrets come from ~/.filius-test.env and are never printed. import { readFileSync } from 'node:fs'; import { randomUUID } from 'node:crypto'; +import { homedir } from 'node:os'; import * as Y from 'yjs'; import { openProjectArchive } from '@mdg-filius/fls'; import { writeProject } from '@mdg-filius/doc'; @@ -11,7 +12,7 @@ import { HocuspocusProvider, HocuspocusProviderWebsocket } from '@hocuspocus/pro import WebSocket from 'ws'; const env = Object.fromEntries( - readFileSync('/root/.filius-test.env', 'utf8') + readFileSync(`${homedir()}/.filius-test.env`, 'utf8') .split('\n') .filter((l) => l.includes('=')) .map((l) => [l.slice(0, l.indexOf('=')).trim(), l.slice(l.indexOf('=') + 1).trim()]),