diff --git a/crates/nu-cli/src/eval_file.rs b/crates/nu-cli/src/eval_file.rs index 88f64da6e..e63032769 100644 --- a/crates/nu-cli/src/eval_file.rs +++ b/crates/nu-cli/src/eval_file.rs @@ -98,6 +98,10 @@ pub fn evaluate_file( "CURRENT_FILE".to_string(), Value::string(file_path.to_string_lossy(), Span::unknown()), ); + stack.add_env_var( + "PROCESS_PATH".to_string(), + Value::string(path, Span::unknown()), + ); let source_filename = file_path .file_name()