fix(get): run_const uses --optional flag (#16268)

`Get::run_const()` was not update along `Get::run()` in #16007.

Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com>
This commit is contained in:
Bahex
2025-07-27 18:17:33 +03:00
committed by sholderbach
parent f390ba1aae
commit 3729fcf667

View File

@ -114,13 +114,14 @@ If multiple cell paths are given, this will produce a list of values."#
) -> Result<PipelineData, ShellError> {
let cell_path: CellPath = call.req_const(working_set, 0)?;
let rest: Vec<CellPath> = call.rest_const(working_set, 1)?;
let ignore_errors = call.has_flag_const(working_set, "ignore-errors")?;
let optional = call.has_flag_const(working_set, "optional")?
|| call.has_flag_const(working_set, "ignore-errors")?;
let metadata = input.metadata();
action(
input,
cell_path,
rest,
ignore_errors,
optional,
working_set.permanent().signals().clone(),
call.head,
)