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()]),