* 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

@ -5,7 +5,7 @@ use std::path::{Component, Path, PathBuf};
use nu_path::{canonicalize_with, expand_path_with};
use nu_protocol::{ShellError, Span, Spanned};
/// This function is like `glob::glob` from the `glob` crate, except it is relative to a given cwd.
/// This function is like `nu_glob::glob` from the `glob` crate, except it is relative to a given cwd.
///
/// It returns a tuple of two values: the first is an optional prefix that the expanded filenames share.
/// This prefix can be removed from the front of each value to give an approximation of the relative path
@ -81,7 +81,7 @@ pub fn glob_from(
let pattern = pattern.to_string_lossy().to_string();
let glob = glob::glob(&pattern).map_err(|err| {
let glob = nu_glob::glob(&pattern).map_err(|err| {
nu_protocol::ShellError::SpannedLabeledError(
"Error extracting glob pattern".into(),
err.to_string(),