`{ name }` renders as the crate name, so cargo-binstall looked for
`fd-find-v10.5.0-<target>.tar.gz`, got a 404, and fell back to the
QuickInstall mirror. The assets are named `fd-v<version>-<target>`.
`{ bin }` is not available in `pkg-url`, so the name is spelled out.
Clap treated a space-separated --format value that starts with '-' as a
new flag. Enable allow_hyphen_values for --format (same as --and) and
add a regression covering markdown-list-style templates. See #2126.
Signed-off-by: Jason Wang <[email protected]>
Calling `maybe_sanitize` on error messages results in newlines getting
replaced with "\x0a". This is not desirable for error messages that have
newlines.
I audited everwhere we construct an error, and call print_error and
confirmed that none of those places have inputs that include found
paths. I'm not too worried about inputs that come from command line
arguments.
This bug was introduced in 92c54d37c0.
Fixes: #2104
When following links, a broken symlink is surfaced by the walker as an
error that carries no depth, so fd stored it with an unknown depth and
the --min-depth filter dropped it for any minimum value. Record the
depth when the entry is created by counting the path components relative
to the matching search root, which is what the issue discussion
suggested. Broken symlinks are now filtered by depth like any other
entry.
Fixes#1017
Use UNIX_EPOCH.checked_add(...) so an out-of-range value returns None
and propagates through the existing ? like every other parse failure in
TimeFilter::from_str, rather than panicking via SystemTime's Add. See #2081.
The path-separator diagnostic (#1873, made unconditional for the primary
pattern in #1975) only inspected opts.pattern. --and patterns (opts.exprs)
are chained with the primary pattern and matched against the file name in
exactly the same way, so a path separator in any of them is the same silent
"no results" footgun. Factor the per-pattern check into a helper and apply
it to the primary pattern plus every --and pattern, mirroring how
ensure_use_hidden_option_for_leading_dot_pattern already iterates all
patterns. --full-path still suppresses the diagnostic. Adds a regression test.
See #1873.
Without --full-path, fd matches patterns against file names, so any pattern
containing a path separator can never match. The previous implementation
in main.rs fired the path-separator diagnostic only when the pattern also
named an existing directory on disk, so the most common Linux/macOS typo
- pasting a full path as the pattern - silently returned zero matches.
Restructure ensure_search_pattern_is_not_a_path so that any '/' in the
pattern triggers the diagnostic unconditionally, and keep the existing
'directory must exist on disk' guard only for the native '\' separator
on Windows, which is also the regex escape character. The Windows check
is short-circuited via '||' so the is_dir syscall never runs when the
pattern already contains '/'. The #[cfg_attr(not(windows), allow(unused_mut))]
attribute keeps the mut binding warning-free on non-Windows targets.
Update the error message to drop the now-ambiguous parenthetical that
showed the platform-specific separator character, and widen the
integration test assertions to cover the full first line so the
assert_failure_with_error helper (which trims lines on both sides) cannot
early-accept on a partial prefix.
Closes#1873
Signed-off-by: SAY-5 <[email protected]>
Add the --ignore-parent flag, mirroring the existing pattern where
--ignore-vcs overrides --no-ignore-vcs. This lets users undo
--no-ignore-parent in aliases or config files.
Closes#1958
- Add FatalError variant to WorkerResult for unrecoverable errors
- Extract search_str_for_entry() helper to propagate IO errors from path_absolute_form
- Propagate fatal errors through job and batch execution paths
- Add regression test for invalid cwd scenario
- Update CHANGELOG for #1900
If you use --print0 with --exec, it will now print a \0 between each set
of commands run. That is, between the output for the commands run for
each found item.
Fixes: #1797