From 90edbba221cdaca3c78595e8bbcfc96ca6bad400 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 17 Oct 2021 12:34:36 +0200 Subject: [PATCH] fix: binary is not in a extracted folder --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e232eee6..0bbd3ec8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -199,7 +199,11 @@ async fn main() -> Result<(), anyhow::Error> { // Generate install paths // Source path is the download dir + the generated binary path let source_file_path = bin_ctx.render(&meta.bin_dir)?; - let source = bin_path.join(&source_file_path); + let source = if meta.pkg_fmt == PkgFmt::Bin { + bin_path.clone() + } else { + bin_path.join(&source_file_path) + }; // Destination path is the install dir + base-name-version{.format} let dest_file_path = bin_ctx.render("{ bin }-v{ version }{ format }")?;