refactor: canonicalize node path

This commit is contained in:
zhom
2025-08-10 01:14:11 +04:00
parent e72397232e
commit 61785dc8f5
2 changed files with 38 additions and 4 deletions
+4
View File
@@ -94,6 +94,10 @@ fn get_node_executable_path(app_dir: &Path) -> PathBuf {
fn is_extraction_valid(app_dir: &Path) -> Result<bool> {
let app_package_json = app_dir.join("app").join("package.json");
let node_executable = get_node_executable_path(app_dir);
#[cfg(windows)]
let node_executable = node_executable
.canonicalize()
.unwrap_or_else(|_| node_executable.clone());
let package_exists = app_package_json.exists();
let node_exists = node_executable.exists();