diff options
author | Norbert Preining <norbert@preining.info> | 2023-03-13 03:04:43 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-03-13 03:04:43 +0000 |
commit | e3c18c7072eebabaa706008b7fa42c73ec2ff83e (patch) | |
tree | bdd26a908e2baa0a97a38169346e53b9e6e51944 /support/texlab/src/features/build.rs | |
parent | b3d8df92a44aa1df24a0869d728b45b0baeaa54c (diff) |
CTAN sync 202303130304
Diffstat (limited to 'support/texlab/src/features/build.rs')
-rw-r--r-- | support/texlab/src/features/build.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/support/texlab/src/features/build.rs b/support/texlab/src/features/build.rs index 69c3a7825c..83a1d4cb32 100644 --- a/support/texlab/src/features/build.rs +++ b/support/texlab/src/features/build.rs @@ -39,7 +39,7 @@ pub enum BuildStatus { pub struct Command { uri: Url, progress: bool, - executable: String, + program: String, args: Vec<String>, working_dir: PathBuf, client: LspClient, @@ -63,12 +63,11 @@ impl Command { return None; } - let options = &workspace.options(db).build; - let executable = options.executable.0.clone(); + let config = &db.config().build; + let program = config.program.clone(); let path = document.location(db).path(db).as_deref().unwrap(); - let args = options + let args = config .args - .0 .iter() .map(|arg| replace_placeholder(arg, path)) .collect(); @@ -83,7 +82,7 @@ impl Command { progress: workspace .client_capabilities(db) .has_work_done_progress_support(), - executable, + program, args, working_dir, client, @@ -99,7 +98,7 @@ impl Command { None }; - let mut process = match std::process::Command::new(&self.executable) + let mut process = match std::process::Command::new(&self.program) .args(self.args) .stdin(Stdio::null()) .stdout(Stdio::piped()) @@ -111,7 +110,7 @@ impl Command { Err(why) => { log::error!( "Failed to spawn process {:?} in directory {}: {}", - self.executable, + self.program, self.working_dir.display(), why ); |