mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-08-04 10:49:55 +00:00
use -dir-report-only w/ latexmk
This commit is contained in:
parent
0261959fe1
commit
d359ec5ed0
1 changed files with 1 additions and 10 deletions
|
@ -12,19 +12,10 @@ mod v483 {
|
|||
|
||||
pub fn parse_latexmkrc(input: &str, src_dir: &Path) -> std::io::Result<LatexmkrcData> {
|
||||
let temp_dir = tempdir()?;
|
||||
let non_existent_tex = temp_dir.path().join("NONEXISTENT.tex");
|
||||
std::fs::write(temp_dir.path().join(".latexmkrc"), input)?;
|
||||
|
||||
// Run `latexmk -dir-report $TMPDIR/NONEXISTENT.tex` to obtain out_dir
|
||||
// and aux_dir values. We pass nonexistent file to prevent latexmk from
|
||||
// building anything, since we need this invocation only to extract the
|
||||
// -dir-report variables.
|
||||
//
|
||||
// In later versions, latexmk provides the -dir-report-only option and we
|
||||
// won't have to resort to this hack with NONEXISTENT.tex.
|
||||
let output = std::process::Command::new("latexmk")
|
||||
.arg("-dir-report")
|
||||
.arg(non_existent_tex)
|
||||
.arg("-dir-report-only")
|
||||
.current_dir(temp_dir.path())
|
||||
.output()?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue