Improve block params (#3450)

This commit is contained in:
JT
2021-05-20 16:26:54 +12:00
committed by GitHub
parent 3075e2cfbf
commit 20f6114617
4 changed files with 48 additions and 18 deletions

View File

@ -253,15 +253,6 @@ fn evaluate_reference(
tag: span.into(),
}),
"$it" => match ctx.scope.get_var("$it") {
Some(v) => Ok(v),
None => Err(ShellError::labeled_error(
"Variable not in scope",
"missing '$it' (note: $it is only available inside of a block)",
span,
)),
},
"$nothing" => Ok(Value {
value: UntaggedValue::nothing(),
tag: span.into(),