Skip to content

Commit 1d6ae92

Browse files
author
Test
committed
🤖 fix: honor MUX_SERVER_AUTH_TOKEN environment variable
Change-Id: I0c52409fe13da349fcd97962b7c39427addc5da2 Signed-off-by: Test <test@example.com>
1 parent 3546705 commit 1d6ae92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cli/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ program
3030
const options = program.opts();
3131
const HOST = options.host as string;
3232
const PORT = Number.parseInt(String(options.port), 10);
33-
const AUTH_TOKEN = ((options.authToken as string | undefined)?.trim() ?? "") || undefined;
33+
const rawAuthToken = (options.authToken as string | undefined) ?? process.env.MUX_SERVER_AUTH_TOKEN;
34+
const AUTH_TOKEN = rawAuthToken?.trim() ? rawAuthToken.trim() : undefined;
3435

3536
class HttpIpcMainAdapter {
3637
private handlers = new Map<string, (event: unknown, ...args: unknown[]) => Promise<unknown>>();

0 commit comments

Comments
 (0)