diff --git a/codex/codex_patcher.py b/codex/codex_patcher.py index 061e874..2a74fc6 100755 --- a/codex/codex_patcher.py +++ b/codex/codex_patcher.py @@ -46,7 +46,7 @@ except ModuleNotFoundError: continue m = _re.match(r'^\[([^\]]+)\]$', line) if m: - keys = [k.strip() for k in m.group(1).split(".")] + keys = [k.strip().strip('"') for k in m.group(1).split(".")] cur = result for k in keys: cur = cur.setdefault(k, {}) @@ -301,8 +301,12 @@ def generate_config_toml(existing, config): for k, v in provider.items(): lines.append(f"{k} = {toml_value(v)}") - # Trust paths - trust_paths = config.get("trust_paths", ["/home", "/root", "/tmp"]) + # Trust paths (add platform-specific paths) + trust_paths = list(config.get("trust_paths", ["/home", "/root", "/tmp"])) + if IS_MACOS: + for mp in ["/Users", "/var/root"]: + if mp not in trust_paths: + trust_paths.append(mp) existing_projects = existing.get("projects", {}) # Add our trust paths