* Fork glob. Normalise license holder

* Fix more licenses

* unwraps

* bad doc test
This commit is contained in:
JT
2022-03-13 11:30:27 -07:00
committed by GitHub
parent 30bb090cd4
commit ff3dffd813
48 changed files with 1582 additions and 53 deletions

View File

@ -1,5 +1,5 @@
use filesize::file_real_size_fast;
use glob::Pattern;
use nu_glob::Pattern;
use nu_protocol::{ShellError, Span, Value};
use std::path::PathBuf;
use std::sync::atomic::{AtomicBool, Ordering};

View File

@ -1,6 +1,6 @@
use crate::{DirBuilder, DirInfo, FileInfo};
use glob::{GlobError, MatchOptions, Pattern};
use nu_engine::CallExt;
use nu_glob::{GlobError, MatchOptions, Pattern};
use nu_protocol::{
ast::Call,
engine::{Command, EngineState, Stack},
@ -103,9 +103,9 @@ impl Command for Du {
let mut paths = match args.path {
Some(p) => {
let p = p.item.to_str().expect("Why isn't this encoded properly?");
glob::glob_with(p, GLOB_PARAMS)
nu_glob::glob_with(p, GLOB_PARAMS)
}
None => glob::glob_with("*", GLOB_PARAMS),
None => nu_glob::glob_with("*", GLOB_PARAMS),
}
.map_err(|e| {
ShellError::SpannedLabeledError(e.msg.to_string(), "glob error".to_string(), tag)