Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cargo/util/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2830,6 +2830,7 @@ pub struct TermConfig {
#[derive(Debug, Default, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct ProgressConfig {
#[serde(default)]
pub when: ProgressWhen,
pub width: Option<usize>,
}
Expand Down
13 changes: 2 additions & 11 deletions tests/testsuite/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn bad_progress_config_missing_width() {
}

#[cargo_test]
fn bad_progress_config_missing_when() {
fn default_progress_is_auto() {
let p = project()
.file(
".cargo/config.toml",
Expand All @@ -65,16 +65,7 @@ fn bad_progress_config_missing_when() {
.file("src/lib.rs", "")
.build();

p.cargo("check")
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] error in [ROOT]/foo/.cargo/config.toml: could not load config key `term.progress`

Caused by:
missing field `when`

"#]])
.run();
p.cargo("check").run();
}

#[cargo_test]
Expand Down