Преглед изворни кода

GOROOT might contains GOPATH, handle permissions.

Steve Thielemann пре 2 недеља
родитељ
комит
bf761cb96e
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      src/main.rs

+ 4 - 0
src/main.rs

@@ -319,6 +319,10 @@ fn main() -> Result<()> {
                         let update = latest_status.download_path();
 
                         println!("Clearing GOROOT {}", go_root);
+
+                        // GOROOT might contain GOPATH files
+                        // Fix permissions before attempting to remove.
+                        recursive_remove_readonly(&go_path)?;
                         remove_dir_all(&go_root)?;
                         create_dir_all(&go_root)?;