]> git.proxmox.com Git - cargo.git/commitdiff
Actually ignore errors
authorMartin Pool <mbp@sourcefrog.net>
Tue, 26 Apr 2022 02:16:29 +0000 (19:16 -0700)
committerMartin Pool <mbp@sourcefrog.net>
Tue, 26 Apr 2022 02:16:29 +0000 (19:16 -0700)
src/cargo/sources/git/source.rs

index a10f02a98262145651a115274893530dad68343f..19a1274825c86e3ffd830b896b3d17b8daa044f5 100644 (file)
@@ -124,7 +124,9 @@ impl<'cfg> Source for GitSource<'cfg> {
         }
 
         let git_fs = self.config.git_path();
-        git_fs.create_dir()?;
+        // Ignore errors creating it, in case this is a read-only filesystem:
+        // perhaps the later operations can succeed anyhow.
+        let _ = git_fs.create_dir();
         let git_path = self.config.assert_package_cache_locked(&git_fs);
 
         // Before getting a checkout, make sure that `<cargo_home>/git` is