From 4ff460de38db506150b290f4e4b9fc5a9d4cc204 Mon Sep 17 00:00:00 2001 From: dotta Date: Tue, 24 Mar 2026 11:51:45 -0500 Subject: [PATCH] Fix embedded-postgres patch env lookup Use globalThis.process.env in the vendor patch so the spawned child process config does not trip over the local process binding inside embedded-postgres. Co-Authored-By: Paperclip --- patches/embedded-postgres@18.1.0-beta.16.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/embedded-postgres@18.1.0-beta.16.patch b/patches/embedded-postgres@18.1.0-beta.16.patch index 0f25ff39..99c2f911 100644 --- a/patches/embedded-postgres@18.1.0-beta.16.patch +++ b/patches/embedded-postgres@18.1.0-beta.16.patch @@ -7,7 +7,7 @@ index ccfe17a82f4879bf20cc345c579a987d9eba5309..dd689f5908f625f49b4785318daea736 `--lc-messages=${LC_MESSAGES_LOCALE}`, ...this.options.initdbFlags, - ], Object.assign(Object.assign({}, permissionIds), { env: { LC_MESSAGES: LC_MESSAGES_LOCALE } })); -+ ], Object.assign(Object.assign({}, permissionIds), { env: Object.assign(Object.assign({}, process.env), { LC_MESSAGES: LC_MESSAGES_LOCALE }) })); ++ ], Object.assign(Object.assign({}, permissionIds), { env: Object.assign(Object.assign({}, globalThis.process.env), { LC_MESSAGES: LC_MESSAGES_LOCALE }) })); // Connect to stderr, as that is where the messages get sent (_a = process.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (chunk) => { // Parse the data as a string and log it @@ -16,7 +16,7 @@ index ccfe17a82f4879bf20cc345c579a987d9eba5309..dd689f5908f625f49b4785318daea736 this.options.port.toString(), ...this.options.postgresFlags, - ], Object.assign(Object.assign({}, permissionIds), { env: { LC_MESSAGES: LC_MESSAGES_LOCALE } })); -+ ], Object.assign(Object.assign({}, permissionIds), { env: Object.assign(Object.assign({}, process.env), { LC_MESSAGES: LC_MESSAGES_LOCALE }) })); ++ ], Object.assign(Object.assign({}, permissionIds), { env: Object.assign(Object.assign({}, globalThis.process.env), { LC_MESSAGES: LC_MESSAGES_LOCALE }) })); // Connect to stderr, as that is where the messages get sent (_a = this.process.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (chunk) => { // Parse the data as a string and log it