From 232b772a6ba8c51f0cf9adac2dea49b19825f3d7 Mon Sep 17 00:00:00 2001 From: zhi Date: Thu, 5 Mar 2026 12:37:29 +0000 Subject: [PATCH] fix: correct openclaw config set command syntax - Move --json flag to correct position (before value) - Add explicit encoding and error handling --- install.mjs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install.mjs b/install.mjs index 0a7a6fd..1282356 100755 --- a/install.mjs +++ b/install.mjs @@ -95,14 +95,13 @@ function getOpenclawConfig(pathKey, defaultValue = undefined) { } function setOpenclawConfig(pathKey, value) { - execSync(`openclaw config set ${pathKey} '${JSON.stringify(value)}' --json`, { - cwd: __dirname - }); + const cmd = `openclaw config set ${pathKey} --json '${JSON.stringify(value)}'`; + execSync(cmd, { cwd: __dirname, encoding: 'utf8' }); } function unsetOpenclawConfig(pathKey) { try { - execSync(`openclaw config unset ${pathKey}`, { cwd: __dirname }); + execSync(`openclaw config unset ${pathKey}`, { cwd: __dirname, encoding: 'utf8' }); } catch { // Ignore errors }