Disable tlmgr in linux (fix #384) (#389)

This commit is contained in:
Roey Darwish Dror
2020-04-03 12:19:55 +03:00
committed by GitHub
parent f103f595fd
commit b8496064ec
3 changed files with 4 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ pub enum TopgradeError {
ProcessFailed(ExitStatus),
#[error("Sudo is required for this step")]
#[allow(dead_code)]
SudoRequired,
#[error("Unknown Linux Distribution")]

View File

@@ -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)]

View File

@@ -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<PathBuf>, run_type: RunType) -> Result<()> {
let tlmgr = utils::require("tlmgr")?;
let kpsewhich = utils::require("kpsewhich")?;