Hmbown/CodeWhale · error · std::io::Error
project-scope config must not be a symlink
Error message
project-scope config must not be a symlink
What it means
Symlink guard in read_project_config_file: symlink_metadata reports the project-scope config file is a symlink, so its contents are refused. Project config is security-sensitive and must be a regular file within the repo rather than a link that could redirect outside it.
Source
Thrown at crates/tui/src/lib.rs:9613
if table.contains_key("instructions") {
eprintln!(
"warning: project-scope `instructions` is ignored — \
configure instruction files from user config instead. \
(See #417.)"
);
}
}
fn read_project_config_file(path: &Path) -> io::Result<Option<String>> {
let metadata = match std::fs::symlink_metadata(path) {
Ok(metadata) => metadata,
Err(err) if err.kind() == io::ErrorKind::NotFound => return Ok(None),
Err(err) => return Err(err),
};
let file_type = metadata.file_type();
if file_type.is_symlink() {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
"project-scope config must not be a symlink",
));
}
if !file_type.is_file() {
return Ok(None);
}
let mut file = open_project_config_file(path)?;
let mut raw = String::new();
file.read_to_string(&mut raw)?;
Ok(Some(raw))
}
#[cfg(unix)]
fn open_project_config_file(path: &Path) -> io::Result<std::fs::File> {
use std::os::unix::fs::OpenOptionsExt;
View on GitHub (pinned to 0c42157ee5)
Solutions
- Replace the symlink with a regular file containing the intended config.
- Commit the real config file rather than a link so project-scope settings load.
- Check checkout/tooling behavior that converted the config into a symlink.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/lib.rs:9613 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/2fc1ac3f4d6758e9.
Report an issue: GitHub.