dev/zhi #1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user