diff --git a/src/error.rs b/src/error.rs index 76c4e4fb..f248faf9 100644 --- a/src/error.rs +++ b/src/error.rs @@ -7,6 +7,7 @@ pub enum TopgradeError { ProcessFailed(ExitStatus), #[error("Sudo is required for this step")] + #[allow(dead_code)] SudoRequired, #[error("Unknown Linux Distribution")] diff --git a/src/main.rs b/src/main.rs index b5db47ab..4813f343 100644 --- a/src/main.rs +++ b/src/main.rs @@ -274,6 +274,7 @@ fn run() -> Result<()> { } if config.should_run(Step::Tlmgr) { + #[cfg(not(target_os = "linux"))] runner.execute("tlmgr", || { generic::run_tlmgr_update( #[cfg(unix)] diff --git a/src/steps/generic.rs b/src/steps/generic.rs index 823f33d5..638e0c0c 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -1,6 +1,6 @@ +#![allow(unused_imports)] use crate::error::{SkipStep, TopgradeError}; use crate::execution_context::ExecutionContext; -#[allow(unused_imports)] use crate::executor::{CommandExt, ExecutorOutput, RunType}; use crate::terminal::{print_separator, shell}; use crate::utils::{self, PathExt}; @@ -117,6 +117,7 @@ pub fn run_stack_update(run_type: RunType) -> Result<()> { run_type.execute(&stack).arg("upgrade").check_run() } +#[cfg(not(target_os = "linux"))] pub fn run_tlmgr_update(sudo: &Option, run_type: RunType) -> Result<()> { let tlmgr = utils::require("tlmgr")?; let kpsewhich = utils::require("kpsewhich")?;