mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 16:08:13 +02:00
Impl one configurable function to run scripts (#3242)
* Impl one func to run scripts * Add exit_on_err * Remove run_standalone * Make the compiler happy :)
This commit is contained in:
@ -10,6 +10,7 @@ use futures::stream::BoxStream;
|
||||
use futures::StreamExt;
|
||||
use futures_codec::FramedRead;
|
||||
use futures_util::TryStreamExt;
|
||||
use log::trace;
|
||||
use nu_data::config::LocalConfigDiff;
|
||||
use nu_protocol::{CommandAction, ConfigPath, TaggedDictBuilder, Value};
|
||||
use nu_source::{Span, Tag};
|
||||
@ -297,6 +298,11 @@ impl Shell for FilesystemShell {
|
||||
if self.mode == FilesystemShellMode::Cli {
|
||||
match dunce::canonicalize(self.path()) {
|
||||
Err(e) => {
|
||||
trace!(
|
||||
"Err canonicalize current path: {:?}, err: {:?}",
|
||||
self.path(),
|
||||
e
|
||||
);
|
||||
let err = ShellError::untagged_runtime_error(format!(
|
||||
"Could not get absolute path from current fs shell. The error was: {:?}",
|
||||
e
|
||||
|
Reference in New Issue
Block a user