dev/zhi #1
@@ -95,14 +95,13 @@ function getOpenclawConfig(pathKey, defaultValue = undefined) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setOpenclawConfig(pathKey, value) {
|
function setOpenclawConfig(pathKey, value) {
|
||||||
execSync(`openclaw config set ${pathKey} '${JSON.stringify(value)}' --json`, {
|
const cmd = `openclaw config set ${pathKey} --json '${JSON.stringify(value)}'`;
|
||||||
cwd: __dirname
|
execSync(cmd, { cwd: __dirname, encoding: 'utf8' });
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function unsetOpenclawConfig(pathKey) {
|
function unsetOpenclawConfig(pathKey) {
|
||||||
try {
|
try {
|
||||||
execSync(`openclaw config unset ${pathKey}`, { cwd: __dirname });
|
execSync(`openclaw config unset ${pathKey}`, { cwd: __dirname, encoding: 'utf8' });
|
||||||
} catch {
|
} catch {
|
||||||
// Ignore errors
|
// Ignore errors
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user