TLDR pages (fix #277) (#290)

This commit is contained in:
Roey Darwish Dror
2020-01-05 22:56:18 +02:00
committed by GitHub
parent b049151993
commit de1ef08ce9
3 changed files with 12 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ pub enum Step {
Atom, Atom,
Firmware, Firmware,
Restarts, Restarts,
Tldr,
} }
#[derive(Deserialize, Default, Debug)] #[derive(Deserialize, Default, Debug)]

View File

@@ -336,6 +336,10 @@ fn run() -> Result<()> {
config.no_retry(), config.no_retry(),
)?; )?;
} }
if config.should_run(Step::Tldr) {
execute(&mut report, "TLDR", || unix::run_tldr(run_type), config.no_retry())?;
}
} }
if config.should_run(Step::Rustup) { if config.should_run(Step::Rustup) {

View File

@@ -79,6 +79,13 @@ pub fn run_home_manager(run_type: RunType) -> Result<()> {
run_type.execute(&home_manager).arg("switch").check_run() run_type.execute(&home_manager).arg("switch").check_run()
} }
pub fn run_tldr(run_type: RunType) -> Result<()> {
let tldr = require("tldr")?;
print_separator("TLDR");
run_type.execute(&tldr).args(&["--update", "-v"]).check_run()
}
pub fn run_pearl(run_type: RunType) -> Result<()> { pub fn run_pearl(run_type: RunType) -> Result<()> {
let pearl = require("pearl")?; let pearl = require("pearl")?;
print_separator("pearl"); print_separator("pearl");