minor changes

This commit is contained in:
Maximilian Wagner
2025-12-27 22:52:04 +01:00
parent b65ed45477
commit 2c05415ed1
7 changed files with 160 additions and 42 deletions

View File

@@ -261,7 +261,6 @@ func LatexCompile() error {
}
LogLine("LaTeX execution started", 2)
execution.ExecutionState = "Started"
var latexCommand *exec.Cmd
switch config.LatexEngine {
@@ -282,19 +281,17 @@ func LatexCompile() error {
return errors.New("Unsupported LaTeX Engine")
}
execution.ExecutionState = "Running"
stdout, err := latexCommand.Output()
if err != nil {
execution.ExecutionState = "Failed"
return err
}
execution.Output = stdout
execution.ExecutionState = "Done"
if err == nil {
execution.ExecutionState = globals.LatexExecutionStateSuccess
} else {
execution.ExecutionState = globals.LatexExecutionStateFailure
}
updateExecutionTimestamp(execution)
LogLine("LaTeX execution finished", 2)
return nil
return err
}
// Checks whether the proxy is trusted. Returns trusted status and the proxy.