fix env shorthand tests

This commit is contained in:
Devyn Cairns 2024-07-06 02:37:17 -07:00
parent 650cc95d94
commit 4c364519a0
No known key found for this signature in database
2 changed files with 8 additions and 3 deletions

View File

@ -287,9 +287,12 @@ fn eval_instruction<D: DebugContext>(
ctx.put_reg(*dst, value.into_pipeline_data());
Ok(Continue)
} else {
Err(ShellError::EnvVarNotFoundAtRuntime {
envvar_name: key.into(),
span: *span,
// FIXME: using the same span twice, shouldn't this really be
// EnvVarNotFoundAtRuntime? There are tests that depend on CantFindColumn though...
Err(ShellError::CantFindColumn {
col_name: key.into(),
span: Some(*span),
src_span: *span,
})
}
}

View File

@ -5279,6 +5279,8 @@ pub fn parse_expression(working_set: &mut StateWorkingSet, spans: &[Span]) -> Ex
let ty = output.ty.clone();
block.pipelines = vec![Pipeline::from_vec(vec![output])];
compile_block(working_set, &mut block);
let block_id = working_set.add_block(Arc::new(block));
let mut env_vars = vec![];