We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88945b4 commit b0850ceCopy full SHA for b0850ce
src/cargo/util/toml_mut/manifest.rs
@@ -323,9 +323,16 @@ impl LocalManifest {
323
};
324
let new_contents_bytes = raw.as_bytes();
325
326
- cargo_util::paths::write_atomic(&self.path, new_contents_bytes)
327
- }
+ // Check if the path is a symlink and follow it if it is
+ let actual_path = if self.path.is_symlink() {
328
+ std::fs::read_link(&self.path)?
329
+ } else {
330
+ self.path.clone()
331
+ };
332
333
+ // Write to the actual target path instead of the symlink
334
+ cargo_util::paths::write_atomic(&actual_path, new_contents_bytes)
335
+ }
336
/// Lookup a dependency.
337
pub fn get_dependency_versions<'s>(
338
&'s self,
0 commit comments