From ee2edd2eac114b1fe483c5cd55ab86aa6f18afed Mon Sep 17 00:00:00 2001 From: Ellen Marie Dash Date: Fri, 20 Dec 2024 12:05:20 -0500 Subject: [PATCH] Avoid 'dist migrate' deleting dist-workspace.toml. A condition like the following was intended to be inverted: A == B && C == D The inverse of this would be: A != B || C != D However, instead, what we had was this partially-inverted logic: A != B && C != D In practice, because of the specific things we were checking, this meant instead of *never* deleting dist-workspace.toml, we were *always* deleting it. --- cargo-dist/src/init.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cargo-dist/src/init.rs b/cargo-dist/src/init.rs index 6767bf95f..298a5a1f7 100644 --- a/cargo-dist/src/init.rs +++ b/cargo-dist/src/init.rs @@ -155,7 +155,7 @@ fn do_migrate_from_dist_toml() -> DistResult<()> { } if root_workspace.kind != WorkspaceKind::Generic - && root_workspace.manifest_path.file_name() != Some("dist.toml") + || root_workspace.manifest_path.file_name() != Some("dist.toml") { return Ok(()); }