From f67387e83605859dc25eb60a23f3ced911f8c5f0 Mon Sep 17 00:00:00 2001 From: haelyra <49814733+haelyra@users.noreply.github.com> Date: Tue, 25 Aug 2026 12:37:53 -0400 Subject: [PATCH] fix(opencode): snapshot invocation environments --- scripts/lib/invocation-environment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lib/invocation-environment.js b/scripts/lib/invocation-environment.js index 33cf45dab..f36a09252 100644 --- a/scripts/lib/invocation-environment.js +++ b/scripts/lib/invocation-environment.js @@ -2,14 +2,14 @@ function resolveInvocationEnvironment(options = {}) { if (Object.prototype.hasOwnProperty.call(options, 'env')) { - return options.env || {}; + return { ...(options.env || {}) }; } if (typeof options.homeDir === 'string' && options.homeDir.trim() !== '') { return {}; } - return process.env; + return { ...process.env }; } module.exports = {