1
0
Fork 0
mirror of https://codeberg.org/Mo8it/How_To_Linux.git synced 2024-11-25 00:31:35 +00:00
How_To_Linux/cs/src/day1/system_update.rs

19 lines
649 B
Rust
Raw Normal View History

2023-08-14 02:32:47 +00:00
use collective_score_client::{
check::{Check, IntoTask, Task},
validator::{file::FileContent, string_content::StringContent},
};
pub fn task() -> Task {
Check::builder()
.description("Checking that you tried to update the system")
.validator(FileContent {
file: dirs::home_dir()
.expect("Failed to get the home directory!")
.join(".local/share/fish/fish_history"),
expected: StringContent::Part("\n- cmd: dnf upgrade"),
})
.hint("Did you try to update the system? Are you in the fish shell?")
.build()
.into_task("system-update")
}