Commit graph

8169 commits

Author SHA1 Message Date
dependabot[bot]
6a335236c1
build(deps): bump once_cell from 1.12.0 to 1.13.0
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-05 06:51:26 +00:00
Sylvestre Ledru
7ca2ae4627
spell: Ignore backport 2022-07-05 08:31:45 +02:00
Sylvestre Ledru
11bbf46647
Only include is_symink for #[cfg(unix)] 2022-07-05 08:30:52 +02:00
Jeffrey Finkelstein
df83d59b2d uucore: add backport for Path::is_symlink()
Add a `uucore::fs::is_symlink()` function that takes in a
`std::path::Path` and decides whether the given path is a symbolic
link. This is essentially a backport of the `Path::is_symlink()`
function that appears in Rust version 1.58.0. This commit also
replaces some now-duplicate code in `chmod`, `cp`, `ln`, and `rmdir`
that checks whether a path is a symbolic link with a call to
`is_symlink()`.

Technically, this commit slightly changes the behavior of
`cp`. Previously, there was a line of code like this

    if fs::symlink_metadata(&source)?.file_type().is_symlink() {

where the `?` operator propagates an error from `symlink_metadata()`
to the caller. Now the line of code is

    if is_symlink(source) {

in which any error from `symlink_metadata()` has been converted to
just be a `false` value. I believe this is a satisfactory tradeoff to
make, since an error in accessing the file will likely cause an error
later in the same code path.
2022-07-04 17:25:52 -04:00
Sylvestre Ledru
480630bfd6
Merge pull request #3696 from cakebaker/numfmt_remove_default_hints_from_help
numfmt: remove duplicate default hints from help
2022-07-04 15:59:07 +02:00
Sylvestre Ledru
4f1d626a47
Merge pull request #3694 from uutils/dependabot/cargo/crossterm-0.24.0
build(deps): bump crossterm from 0.23.2 to 0.24.0
2022-07-04 15:58:52 +02:00
Sylvestre Ledru
a2be505935
Merge pull request #3695 from uutils/dependabot/cargo/onig-6.3.2
build(deps): bump onig from 6.3.1 to 6.3.2
2022-07-04 15:53:02 +02:00
Sylvestre Ledru
849086f80e
Merge pull request #3693 from uutils/dependabot/cargo/filetime-0.2.17
build(deps): bump filetime from 0.2.16 to 0.2.17
2022-07-04 13:08:58 +02:00
Daniel Hofstetter
bd29a8c472 numfmt: remove duplicate default hints from help 2022-07-04 10:28:47 +02:00
dependabot[bot]
ffee1a751e
build(deps): bump onig from 6.3.1 to 6.3.2
Bumps [onig](https://github.com/iwillspeak/rust-onig) from 6.3.1 to 6.3.2.
- [Release notes](https://github.com/iwillspeak/rust-onig/releases)
- [Commits](https://github.com/iwillspeak/rust-onig/commits/v6.3.2)

---
updated-dependencies:
- dependency-name: onig
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 06:36:47 +00:00
dependabot[bot]
e5306d1f30
build(deps): bump crossterm from 0.23.2 to 0.24.0
Bumps [crossterm](https://github.com/crossterm-rs/crossterm) from 0.23.2 to 0.24.0.
- [Release notes](https://github.com/crossterm-rs/crossterm/releases)
- [Changelog](https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossterm-rs/crossterm/commits/0.24)

---
updated-dependencies:
- dependency-name: crossterm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 06:36:34 +00:00
dependabot[bot]
ffd49076d9
build(deps): bump filetime from 0.2.16 to 0.2.17
Bumps [filetime](https://github.com/alexcrichton/filetime) from 0.2.16 to 0.2.17.
- [Release notes](https://github.com/alexcrichton/filetime/releases)
- [Commits](https://github.com/alexcrichton/filetime/commits/0.2.17)

---
updated-dependencies:
- dependency-name: filetime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 06:36:19 +00:00
Jeffrey Finkelstein
4780690caa cp: copy attributes of dangling symbolic link
Fix a bug in which `cp` incorrectly exited with an error when
attempting to copy the attributes of a dangling symbolic link (that
is, when running `cp -P -p`).

Fixes #3531.
2022-07-03 15:17:00 -04:00
Jeffrey Finkelstein
a7a9da9672 cp: refactor convenience function is_symlink()
Refactor common code used in several places into a convenience
function `is_symlink()` that behaves like `Path::is_symlink()` added
in Rust 1.58.0. (We support earlier versions of Rust so we cannot use
the standard library version of this function.)
2022-07-03 15:17:00 -04:00
Jeffrey Finkelstein
78a11ad69b tests/common/util: add AtPath::symlink_exists()
Add helper method for deciding whether a symbolic link exists in the
test directory.
2022-07-03 13:44:29 -04:00
Sylvestre Ledru
03b208cb9d
Merge pull request #3688 from anastygnome/fork
rebase of #3679:  Fix wc gnu test suite compatibility - Closes: #3678
2022-07-02 11:21:48 +02:00
Gergely Kalas
bd96f25ec8 Add new test to verify GNU compatible quotation.
Co-authored-by: anastygnome <noreplygitemail@protonmail.com>
2022-07-01 16:43:09 +02:00
Gergely Kalas
4f043ff57f Fix 'wc' gnu test-suite compatibility #3678
This change will extract a utility already present in ls to uucore.
This utility is used by dir and vdir too, which are adjusted to
look it up in uucode. No further changes to ls, dir or dirv intended.

The change here largely fiddles with the output of uu_wc to match
that of GNU wc. This is the case to the extent to make unit tests
pass, however, there are differences remaining. One specific
difference I did not tackle is that GNU wc will not align the
output columns (compute_number_width() -> 1) in the specific case
of the input for --files0-from=- being a named pipe, not real stdin.
This difference can be triggered using the following two invocations.
  - wc --files0-from=- < files0 # use a named pipe, GNU does align
  - cat files0- | wc --files0-from=- # use real stdin, GNU does not
    align.
2022-07-01 16:43:09 +02:00
Sylvestre Ledru
64bc20c2d8
Merge pull request #3686 from cakebaker/show_error_if_padding_is_zero
numfmt: show error if --padding is zero
2022-07-01 15:57:29 +02:00
Sylvestre Ledru
6df09562f6
Merge pull request #3687 from cakebaker/clippy_extra_unused_lifetimes
cp: disable "extra_unused_lifetimes" lint
2022-07-01 15:53:51 +02:00
Daniel Hofstetter
6d8aa1aaff cp: disable "extra_unused_lifetimes" lint 2022-07-01 14:54:20 +02:00
Daniel Hofstetter
220c3ca4fb numfmt: show error if --padding is zero 2022-07-01 13:34:05 +02:00
Sylvestre Ledru
f6a88552ab
Merge pull request #3667 from cakebaker/set_default_missing_value
uniq: set default missing value for "group" and "all-repeated" args
2022-07-01 00:01:21 +02:00
Sylvestre Ledru
63bf7db171
Merge pull request #3682 from cakebaker/ticket_3246
df: fix output if input path is device name
2022-06-30 23:55:58 +02:00
Sylvestre Ledru
753e7fd798
Merge pull request #3684 from uutils/dependabot/cargo/smallvec-1.9.0
build(deps): bump smallvec from 1.8.0 to 1.9.0
2022-06-30 23:54:11 +02:00
Sylvestre Ledru
5b34b9a97b
Merge pull request #3681 from cakebaker/realpath_add_no_symlinks_alias
realpath: add "--no-symlinks" alias
2022-06-30 18:42:05 +02:00
Sylvestre Ledru
64276a3445
Merge pull request #3676 from uutils/dependabot/cargo/strum_macros-0.24.2
build(deps): bump strum_macros from 0.24.1 to 0.24.2
2022-06-30 18:41:20 +02:00
Daniel Hofstetter
72862512da uniq: set default missing value for args 2022-06-30 11:52:46 +02:00
Niyaz Nigmatullin
4e936d2d0d test_realpath: include issue id to ignored testcase 2022-06-30 11:52:17 +02:00
Niyaz Nigmatullin
9b2fa39760 test_realpath: get back to contains to pass in MacOs 2022-06-30 11:52:17 +02:00
Niyaz Nigmatullin
b3642b64c5 test_realpath: reformatted using rustfmt 2022-06-30 11:52:17 +02:00
Niyaz Nigmatullin
1ecc789dea test_realpath: fixed test to be the one that was supposed to be and
added non-passing test
2022-06-30 11:52:17 +02:00
dependabot[bot]
39d62e08d5 build(deps): bump strum_macros from 0.24.1 to 0.24.2
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 11:51:28 +02:00
Daniel Hofstetter
113f0bd92b realpath: add "--no-symlinks" alias 2022-06-30 11:51:24 +02:00
Daniel Hofstetter
9b9d369298 df: fix output if input path is device name
Fixes #3246
2022-06-30 11:51:20 +02:00
dependabot[bot]
01017ac301 build(deps): bump smallvec from 1.8.0 to 1.9.0
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 11:51:13 +02:00
Sylvestre Ledru
a66527e3e2
Merge pull request #3683 from sylvestre/pin-cross-2
pin the cross in the ci (Closes: #3673)
2022-06-30 11:50:43 +02:00
Sylvestre Ledru
c2d1d061ef Pin the cross version in the ci (Closes: #3683) 2022-06-29 17:53:08 +02:00
Sylvestre Ledru
a772f5c466
Merge pull request #3677 from cakebaker/shuf_missing_spaces
shuf: add missing spaces to about text
2022-06-27 16:30:09 +02:00
Daniel Hofstetter
62d9305785 shuf: add missing spaces to about text 2022-06-27 09:21:48 +02:00
Sylvestre Ledru
6be25eee26
Merge pull request #3670 from tertsdiepraam/rm-completion-fix
`rm`: fix help text mistakenly being used as the long option
2022-06-25 22:06:45 +02:00
Terts Diepraam
aab9134062 rm: fix help text mistakenly being used as the long option 2022-06-24 20:03:27 +02:00
Patrick Jackson
78a77c4211
dd: fix output issues (#3610) 2022-06-24 08:58:10 +02:00
Sylvestre Ledru
b6bb476aa0
Merge pull request #3659 from cakebaker/ticket_3637
paste: implement "-z" flag
2022-06-23 22:20:09 +02:00
Sylvestre Ledru
2fb743b72a
Merge pull request #3663 from niyaznigmatullin/fix_install_C_test
Fix install c test
2022-06-23 17:09:02 +02:00
Sylvestre Ledru
7c7c694837
Merge pull request #3657 from ElijahSink/main
closes #3650: install -V does not show the filename
2022-06-23 16:57:35 +02:00
Terts Diepraam
8657f8f6a6
Merge pull request #3664 from uutils/cov-no-needs
Coverage jobs should start at the same time as others
2022-06-23 16:40:56 +02:00
Sylvestre Ledru
1bd5014235
Coverage jobs should start at the same time as others
No need to wait for the regular builds
esp as they might have intermittent
2022-06-22 22:43:16 +02:00
Niyaz Nigmatullin
ba136ba3fb tests: add tests for install to check -C option usage 2022-06-22 21:30:59 +03:00
Niyaz Nigmatullin
61ad2c17b0 uu_install: add inconsistent args check 2022-06-22 19:56:22 +03:00