dua-cli: 2.22.0 -> 2.23.0
This commit is contained in:
parent
ac02c9d998
commit
ef3a67ac90
@ -1,6 +1,5 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF39kgJZFbc6fnp6NLwadftWz/xO7zQXMeqSwectsQe/hYt+hfN/WZmDdxBLPOwsUXuvhc3ujwID5qoTcopHG7qws=
|
||||
SHA256 (Pkgfile) = 0641395f5d02b8dfa9d77aa9a2780d8bd675d0e8a2da64e4563df91a71b05f14
|
||||
RWSagIOpLGJF33Q0+GxQjG2zim0rb7/ClnmFRbMFY1n5joutpxG/Db/wHqMwI8+Z6MwSo4eRTKOsURBPs3aQm4nN8pcXFa1tNg4=
|
||||
SHA256 (Pkgfile) = 1e5f3f185111cbcf49a311c476a3d154f8eacb03f0bd2a39587b24b99651b79d
|
||||
SHA256 (.footprint) = 43495e19ba0c91be14d647b01c80d7b85a829206d275de5b35348405941aa05c
|
||||
SHA256 (dua-cli-2.22.0.tar.gz) = e520bc22354afa8c6ef8e03c0bcf23d5c3cd9b3ace1632d443ff21799fd3ef45
|
||||
SHA256 (195.patch) = c555ccc2f19cbf00cddbdf03e3abc2d9111a344745f99134ec8f46b41af2afee
|
||||
SHA256 (dua-cli-2.23.0.tar.gz) = 61f6fd0c13949d23224d9776c2fd444956d73dd363501e867cf11df6ca89ddfa
|
||||
|
@ -1,52 +0,0 @@
|
||||
From 192460e5bc72781be1d238912c5d590bfed706cf Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Thiel <sebastian.thiel@icloud.com>
|
||||
Date: Mon, 11 Dec 2023 12:33:44 +0100
|
||||
Subject: [PATCH] fix: single files will not cause IO error (#194)
|
||||
|
||||
Running `dua <filename>` will once again provide size information
|
||||
about that filename.
|
||||
---
|
||||
src/main.rs | 2 +-
|
||||
tests/snapshots/success-single-file | 1 +
|
||||
tests/stateless-journey.sh | 6 ++++++
|
||||
3 files changed, 8 insertions(+), 1 deletion(-)
|
||||
create mode 100644 tests/snapshots/success-single-file
|
||||
|
||||
diff --git a/src/main.rs b/src/main.rs
|
||||
index a655ea1..a610f6f 100644
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -130,7 +130,7 @@ fn extract_paths_maybe_set_cwd(
|
||||
mut paths: Vec<PathBuf>,
|
||||
cross_filesystems: bool,
|
||||
) -> Result<Vec<PathBuf>, io::Error> {
|
||||
- if paths.len() == 1 {
|
||||
+ if paths.len() == 1 && paths[0].is_dir() {
|
||||
std::env::set_current_dir(&paths[0])?;
|
||||
paths.clear();
|
||||
}
|
||||
diff --git a/tests/snapshots/success-single-file b/tests/snapshots/success-single-file
|
||||
new file mode 100644
|
||||
index 0000000..8321cbf
|
||||
--- /dev/null
|
||||
+++ b/tests/snapshots/success-single-file
|
||||
@@ -0,0 +1 @@
|
||||
+[32m 4.10 KB[39m a
|
||||
\ No newline at end of file
|
||||
diff --git a/tests/stateless-journey.sh b/tests/stateless-journey.sh
|
||||
index 37a32c2..2557f3a 100755
|
||||
--- a/tests/stateless-journey.sh
|
||||
+++ b/tests/stateless-journey.sh
|
||||
@@ -31,6 +31,12 @@ WITH_FAILURE=1
|
||||
expect_run ${SUCCESSFULLY} "$exe" aggregate
|
||||
}
|
||||
)
|
||||
+ (with "a single file argument"
|
||||
+ it "produces a human-readable (metric) size display of that file" && {
|
||||
+ WITH_SNAPSHOT="$snapshot/success-single-file" \
|
||||
+ expect_run ${SUCCESSFULLY} "$exe" aggregate a
|
||||
+ }
|
||||
+ )
|
||||
(with "sorting disabled"
|
||||
it "produces a human-readable (metric) aggregate of everything within the current directory, alphabetically sorted, with total" && {
|
||||
WITH_SNAPSHOT="$snapshot/success-no-arguments-no-sort" \
|
@ -4,18 +4,15 @@
|
||||
# Depends on: rust
|
||||
|
||||
name=dua-cli
|
||||
version=2.22.0
|
||||
release=2
|
||||
source=(https://github.com/Byron/dua-cli/archive/v$version/$name-$version.tar.gz
|
||||
195.patch)
|
||||
version=2.23.0
|
||||
release=1
|
||||
source=(https://github.com/Byron/dua-cli/archive/v$version/$name-$version.tar.gz)
|
||||
|
||||
build() {
|
||||
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
||||
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
||||
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
||||
|
||||
patch -Np1 -d $name-$version -i $SRC/195.patch
|
||||
|
||||
cargo build --release --locked --manifest-path $name-$version/Cargo.toml
|
||||
|
||||
install -Dt $PKG/usr/bin $name-$version/target/release/dua
|
||||
|
Loading…
x
Reference in New Issue
Block a user