mirror of
https://github.com/nushell/nushell
synced 2025-01-28 04:45:18 +00:00
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:
parent
1ecbb3e09f
commit
533603b72c
1 changed files with 13 additions and 0 deletions
|
@ -46,6 +46,19 @@ impl Command for Describe {
|
||||||
detailed: call.has_flag(engine_state, stack, "detailed")?,
|
detailed: call.has_flag(engine_state, stack, "detailed")?,
|
||||||
collect_lazyrecords: call.has_flag(engine_state, stack, "collect-lazyrecords")?,
|
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)
|
run(Some(engine_state), call, input, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue