{"record":{"id":"4ac4745de0acb370","repo":"astral-sh/uv","slug":"the-executable-directory-is-not-in-path-but-up","errorCode":null,"errorMessage":"The executable directory {} is not in PATH, but updating {shell} is currently unsupported","messagePattern":"The executable directory (.+?) is not in PATH, but updating (.+?) is currently unsupported","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/uv/src/commands/update_shell.rs","lineNumber":67,"sourceCode":"            printer.stderr(),\n            \"Executable directory {} is already in PATH\",\n            executable_directory.simplified_display().cyan()\n        )?;\n        return Ok(ExitStatus::Success);\n    }\n\n    // Determine the current shell.\n    let Some(shell) = Shell::from_env() else {\n        return Err(anyhow::anyhow!(\n            \"The executable directory {} is not in PATH, but the current shell could not be determined\",\n            executable_directory.simplified_display().cyan()\n        ));\n    };\n\n    // Look up the configuration files (e.g., `.bashrc`, `.zshrc`) for the shell.\n    let files = shell.configuration_files();\n    if files.is_empty() {\n        return Err(anyhow::anyhow!(\n            \"The executable directory {} is not in PATH, but updating {shell} is currently unsupported\",\n            executable_directory.simplified_display().cyan()\n        ));\n    }\n\n    // Prepare the command (e.g., `export PATH=\"$HOME/.cargo/bin:$PATH\"`).\n    let Some(command) = shell.prepend_path(executable_directory) else {\n        return Err(anyhow::anyhow!(\n            \"The executable directory {} is not in PATH, but the necessary command to update {shell} could not be determined\",\n            executable_directory.simplified_display().cyan()\n        ));\n    };\n\n    // Update each file, as necessary.\n    let mut updated = false;\n    for file in files {\n        // Search for the command in the file, to avoid redundant updates.\n        match fs_err::tokio::read_to_string(&file).await {","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/astral-sh/uv/blob/f1a42680ff5272232d65748acf338b19778dde24/crates/uv/src/commands/update_shell.rs#L49-L85","documentation":"Error \"The executable directory {} is not in PATH, but updating {shell} is currently unsupported\" thrown in astral-sh/uv.","triggerScenarios":"Thrown at crates/uv/src/commands/update_shell.rs:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f1a42680ff5272232d65748acf338b19778dde24","analyzedAt":"2026-08-16T04:51:47.599Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}