Add deprecation warning to describe --collect-lazyrecords (#12667)

# Description
Missed a spot for lazy record deprecation. This adds a warning for the
`--collect-lazyrecords` flag on `describe`.
This commit is contained in:
Ian Manske 2024-04-26 16:36:30 +00:00 committed by GitHub
parent 1ecbb3e09f
commit 533603b72c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,6 +46,19 @@ impl Command for Describe {
detailed: call.has_flag(engine_state, stack, "detailed")?,
collect_lazyrecords: call.has_flag(engine_state, stack, "collect-lazyrecords")?,
};
if options.collect_lazyrecords {
nu_protocol::report_error_new(
engine_state,
&ShellError::GenericError {
error: "Deprecated flag".into(),
msg: "the `--collect-lazyrecords` flag is deprecated, since lazy records will be removed in 0.94.0"
.into(),
span: Some(call.head),
help: None,
inner: vec![],
},
);
}
run(Some(engine_state), call, input, options)
}