From c0140d6523224b1f27e56923823921b2a1a7d019 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Sat, 30 Sep 2023 17:09:49 +0530 Subject: [PATCH] feat: add dir to path if not already there --- package/action/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/action/src/main.rs b/package/action/src/main.rs index b1039f9..06d09a8 100644 --- a/package/action/src/main.rs +++ b/package/action/src/main.rs @@ -28,12 +28,16 @@ fn main() { let (zip_path, meta) = download_release(version).expect_or_log("failed to download latest lune release"); - install_lune( + let mut install_path = install_lune( File::open(&zip_path).unwrap_or_else(|_| panic!("failed to open downloaded lune release zip file @ {}", zip_path.to_string_lossy())), meta, ) .expect_or_log("failed to install lune. did we not have perms to write to the required directories?"); + install_path.pop(); + + core::add_path(install_path.to_string_lossy()); + // Cleanup downloaded & unzipped stuff let to_remove = read_dir(".") .expect_or_log("failed to read current working directory")