Compare commits
2 Commits
v0.1.2
...
cuddle-ple
Author | SHA1 | Date | |
---|---|---|---|
|
a47903ac17 | ||
1b2a35509c
|
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.2.0] - 2025-08-24
|
||||
|
||||
### Added
|
||||
- move also creates parent dir on destination
|
||||
|
||||
## [0.1.2] - 2025-08-08
|
||||
|
||||
### Added
|
||||
|
@@ -3,7 +3,7 @@ members = ["crates/*"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.2"
|
||||
version = "0.2.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
noil = { path = "crates/noil" }
|
||||
|
@@ -328,6 +328,14 @@ pub async fn apply(input: &str, options: ApplyOptions) -> anyhow::Result<()> {
|
||||
anyhow::bail!("destination already exists cannot move");
|
||||
}
|
||||
|
||||
if let Some(parent) = existing.path.parent()
|
||||
&& !parent.exists()
|
||||
{
|
||||
tokio::fs::create_dir_all(&parent)
|
||||
.await
|
||||
.context("failed to create dest for move")?;
|
||||
}
|
||||
|
||||
tokio::fs::rename(&existing.path, path)
|
||||
.await
|
||||
.context("move path")?;
|
||||
|
Reference in New Issue
Block a user