mirror of
https://github.com/nushell/nushell
synced 2024-12-29 06:23:11 +00:00
Treat all the startup commands as a single script file (#2890)
This commit is contained in:
parent
ac9909112f
commit
2dcb16870b
1 changed files with 4 additions and 3 deletions
|
@ -359,11 +359,12 @@ async fn run_startup_commands(
|
|||
value: UntaggedValue::Table(pipelines),
|
||||
..
|
||||
} => {
|
||||
let mut script_file = String::new();
|
||||
for pipeline in pipelines {
|
||||
if let Ok(pipeline_string) = pipeline.as_string() {
|
||||
let _ = run_script_standalone(pipeline_string, false, context, false).await;
|
||||
}
|
||||
script_file.push_str(&pipeline.as_string()?);
|
||||
script_file.push('\n');
|
||||
}
|
||||
let _ = run_script_standalone(script_file, false, context, false).await;
|
||||
}
|
||||
_ => {
|
||||
return Err(ShellError::untagged_runtime_error(
|
||||
|
|
Loading…
Reference in a new issue