Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Avoid 'dist migrate' deleting dist-workspace.toml. #1661

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

duckinator
Copy link
Contributor

@duckinator duckinator commented Dec 20, 2024

A condition like the following was intended to be switched from == to !=:

A == B && C == D

The correct way to do this would be:

A != B || C != D

However, instead, what we had was this 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.

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.
@duckinator
Copy link
Contributor Author

Fortunately, a duplicate check in dist init prevent that from having the same bug.

@duckinator duckinator changed the title Avoid 'dist migrate' deleting dist-workspace.toml. fix: Avoid 'dist migrate' deleting dist-workspace.toml. Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant