tried to move source command into parser (still doesn't compile)

This commit is contained in:
Tanishq Kancharla
2021-09-27 08:10:18 -04:00
parent 1d945d8ce3
commit 719920fa37
7 changed files with 126 additions and 3 deletions

View File

@ -101,7 +101,7 @@ pub fn source(ctx: &EvaluationContext, call: &Call, input: Value) -> Result<Valu
let (block, err) = parse(&mut working_set, None, &contents, true);
if let Some(e) = err {
// Be more specific here: need to convert parse error to string
Err(ShellError::InternalError("Parse error in file".to_string()))
Err(e.into())
} else {
let result = eval_block(ctx, &block, input);
match result {