Skip to content

environment variable cleanup fails - Codex

Quick fix

The original post recommends parsing the line number from the final colon to preserve complete shell configuration file paths containing colons.

Error output
It then attempts to read or write an unrelated, usually nonexistent path.

In Unix environment variable cleanup logic, the scanner stores sources in `path:line` format. When a shell configuration path itself contains colons, using `split(':')` truncates the path at the first colon, causing reads or writes to the wrong path. The report states that macOS and Linux are both affected.

The original post suggests using `rsplit_once(':')` and validating the line number on the right, but the issue remains open, with no maintainer confirmation or user-verified fix.

  1. The original post does not provide a verifiable solution yet; follow the progress of #7169. The proposed direction is to separate the line number at the final colon instead of splitting the path at every colon.

ToolCodex
Version3.20.1(报告的受影响版本)
PlatformsmacOSLinux

(No FAQ yet)

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.