Selaa lähdekoodia

GOROOT might contains GOPATH, handle permissions.

Steve Thielemann 2 viikkoa sitten
vanhempi
commit
bf761cb96e
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  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)?;