Skip to content

Commit e50ddec

Browse files
oech3cakebaker
authored andcommitted
du: make du -a -s error
1 parent 5338401 commit e50ddec

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/uu/du/src/du.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,7 @@ pub fn uu_app() -> Command {
12881288
.short('a')
12891289
.long(options::ALL)
12901290
.help(translate!("du-help-all"))
1291+
.conflicts_with(options::SUMMARIZE)
12911292
.action(ArgAction::SetTrue),
12921293
)
12931294
.arg(

tests/by-util/test_du.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ fn du_basics(s: &str) {
8484
assert_eq!(s, answer);
8585
}
8686

87+
#[test]
88+
fn test_all_summarize() {
89+
new_ucmd!().arg("-a").arg("-s").fails_with_code(1); //clap provided message
90+
}
91+
8792
#[test]
8893
fn test_invalid_arg() {
8994
new_ucmd!().arg("--definitely-invalid").fails_with_code(1);

0 commit comments

Comments
 (0)