diff --git a/xtask/src/commands/copy_lsp.rs b/xtask/src/commands/copy_lsp.rs index 6792f967..d9c18d2a 100644 --- a/xtask/src/commands/copy_lsp.rs +++ b/xtask/src/commands/copy_lsp.rs @@ -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); diff --git a/xtask/src/commands/copy_lsp_release.rs b/xtask/src/commands/copy_lsp_release.rs index 88b12aa6..da35155f 100644 --- a/xtask/src/commands/copy_lsp_release.rs +++ b/xtask/src/commands/copy_lsp_release.rs @@ -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); diff --git a/xtask/src/commands/install.rs b/xtask/src/commands/install.rs index 3ed4a814..759cd9ee 100644 --- a/xtask/src/commands/install.rs +++ b/xtask/src/commands/install.rs @@ -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) { diff --git a/xtask/src/commands/package.rs b/xtask/src/commands/package.rs index e46d3f99..88e0bf4e 100644 --- a/xtask/src/commands/package.rs +++ b/xtask/src/commands/package.rs @@ -27,6 +27,9 @@ pub fn package(output_dir: Option) -> 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);