committed by
GitHub
parent
f103f595fd
commit
b8496064ec
@@ -7,6 +7,7 @@ pub enum TopgradeError {
|
|||||||
ProcessFailed(ExitStatus),
|
ProcessFailed(ExitStatus),
|
||||||
|
|
||||||
#[error("Sudo is required for this step")]
|
#[error("Sudo is required for this step")]
|
||||||
|
#[allow(dead_code)]
|
||||||
SudoRequired,
|
SudoRequired,
|
||||||
|
|
||||||
#[error("Unknown Linux Distribution")]
|
#[error("Unknown Linux Distribution")]
|
||||||
|
|||||||
@@ -274,6 +274,7 @@ fn run() -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if config.should_run(Step::Tlmgr) {
|
if config.should_run(Step::Tlmgr) {
|
||||||
|
#[cfg(not(target_os = "linux"))]
|
||||||
runner.execute("tlmgr", || {
|
runner.execute("tlmgr", || {
|
||||||
generic::run_tlmgr_update(
|
generic::run_tlmgr_update(
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
#![allow(unused_imports)]
|
||||||
use crate::error::{SkipStep, TopgradeError};
|
use crate::error::{SkipStep, TopgradeError};
|
||||||
use crate::execution_context::ExecutionContext;
|
use crate::execution_context::ExecutionContext;
|
||||||
#[allow(unused_imports)]
|
|
||||||
use crate::executor::{CommandExt, ExecutorOutput, RunType};
|
use crate::executor::{CommandExt, ExecutorOutput, RunType};
|
||||||
use crate::terminal::{print_separator, shell};
|
use crate::terminal::{print_separator, shell};
|
||||||
use crate::utils::{self, PathExt};
|
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()
|
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<()> {
|
pub fn run_tlmgr_update(sudo: &Option<PathBuf>, run_type: RunType) -> Result<()> {
|
||||||
let tlmgr = utils::require("tlmgr")?;
|
let tlmgr = utils::require("tlmgr")?;
|
||||||
let kpsewhich = utils::require("kpsewhich")?;
|
let kpsewhich = utils::require("kpsewhich")?;
|
||||||
|
|||||||
Reference in New Issue
Block a user