Skip to content

Commit

Permalink
xtask fix: make sure LSP destination exists
Browse files Browse the repository at this point in the history
  • Loading branch information
SpontanCombust committed Jan 27, 2024
1 parent 932f7f8 commit aba5d46
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xtask/src/commands/copy_lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pub fn copy_lsp() -> anyhow::Result<()> {
format!("{SRC}.exe")
};

// make sure DST exists
sh.create_dir(DST)?;

sh.copy_file(src, DST)?;
println!("Copied debug LSP into {}", DST);

Expand Down
3 changes: 3 additions & 0 deletions xtask/src/commands/copy_lsp_release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pub fn copy_lsp_release() -> anyhow::Result<()> {
format!("{SRC}.exe")
};

// make sure DST exists
sh.create_dir(DST)?;

sh.copy_file(src, DST)?;
println!("Copied release LSP into {}", DST);

Expand Down
4 changes: 4 additions & 0 deletions xtask/src/commands/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ pub fn install() -> anyhow::Result<()> {
format!("{LSP_SRC}.exe")
};

// make sure DST exists
sh.create_dir(LSP_DST)?;

sh.copy_file(lsp_src, LSP_DST)?;
println!("Copied LSP into {}", LSP_DST);


sh.change_dir(EXT_DIR);

if cfg!(unix) {
Expand Down
3 changes: 3 additions & 0 deletions xtask/src/commands/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ pub fn package(output_dir: Option<String>) -> anyhow::Result<()> {
format!("{LSP_SRC}.exe")
};

// make sure DST exists
sh.create_dir(LSP_DST)?;

sh.copy_file(lsp_src, LSP_DST)?;
println!("Copied LSP into {}", LSP_DST);

Expand Down

0 comments on commit aba5d46

Please sign in to comment.