Don't report error when cwd is not exists. (#5590)

* only set cwd for child process if cwd exists, and avoid showing error when pwd is not exists

* better comment text

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
WindSoilder
2022-05-20 20:03:03 +08:00
committed by GitHub
parent 0d06b6259f
commit 6efd1bcb3f
2 changed files with 6 additions and 6 deletions

View File

@ -220,10 +220,7 @@ pub fn eval_source(
}
};
if let Err(err) = engine_state.merge_delta(delta, Some(stack), &cwd) {
let working_set = StateWorkingSet::new(engine_state);
report_error(&working_set, &err);
}
let _ = engine_state.merge_delta(delta, Some(stack), &cwd);
match eval_block(engine_state, stack, &block, input, false, false) {
Ok(mut pipeline_data) => {