mirror of
https://github.com/nushell/nushell
synced 2025-01-14 14:14:13 +00:00
Fix unwrap in open
This commit is contained in:
parent
6e0cb6b809
commit
abfd417430
1 changed files with 6 additions and 3 deletions
|
@ -63,10 +63,13 @@ fn run(
|
||||||
|
|
||||||
let stream = async_stream_block! {
|
let stream = async_stream_block! {
|
||||||
|
|
||||||
//FIXME: unwraps
|
let result = fetch(&full_path, &path_str, path_span).await;
|
||||||
|
|
||||||
let (file_extension, contents, contents_tag, span_source) =
|
if let Err(e) = result {
|
||||||
fetch(&full_path, &path_str, path_span).await.unwrap();
|
yield Err(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let (file_extension, contents, contents_tag, span_source) = result.unwrap();
|
||||||
|
|
||||||
let file_extension = if has_raw {
|
let file_extension = if has_raw {
|
||||||
None
|
None
|
||||||
|
|
Loading…
Reference in a new issue