fix: handle disabled digest outputs properly
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -175,20 +175,17 @@ impl MetaPlugin for DigestMetaPlugin {
|
||||
metadata.push(meta_data);
|
||||
}
|
||||
|
||||
// Set unused outputs to None
|
||||
let unused_outputs: Vec<&str> = match hasher {
|
||||
Hasher::Md5(_) => vec!["digest_sha256", "digest_sha512"],
|
||||
Hasher::Sha256(_) => vec!["digest_md5", "digest_sha512"],
|
||||
Hasher::Sha512(_) => vec!["digest_md5", "digest_sha256"],
|
||||
};
|
||||
|
||||
for output_name in unused_outputs {
|
||||
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
|
||||
output_name,
|
||||
serde_yaml::Value::Null,
|
||||
&self.outputs
|
||||
) {
|
||||
metadata.push(meta_data);
|
||||
// Set all other digest outputs to None
|
||||
let all_outputs = vec!["digest_md5", "digest_sha256", "digest_sha512"];
|
||||
for output_name in all_outputs {
|
||||
if output_name != hasher.output_name() {
|
||||
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
|
||||
output_name,
|
||||
serde_yaml::Value::Null,
|
||||
&self.outputs
|
||||
) {
|
||||
metadata.push(meta_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user