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

PDM_BUILD_NO_CLEAN handling doesn't seem right #166

Closed
genericmoniker opened this issue Apr 21, 2023 · 0 comments
Closed

PDM_BUILD_NO_CLEAN handling doesn't seem right #166

genericmoniker opened this issue Apr 21, 2023 · 0 comments

Comments

@genericmoniker
Copy link

genericmoniker commented Apr 21, 2023

In Builder.clean (source), there is this if statement:

        if (
            not self.config_settings.get("no-clean-build")
            or os.getenv("PDM_BUILD_NO_CLEAN", "false").lower() != "false"
        ):
            self.clean(context)

The double-negatives pinch my brain a bit, but it seems like != "false" should be == "false".

If I want the build directory to not be cleaned I would set:

PDM_BUILD_NO_CLEAN=true

As the code is, "true" != "false" evaluates to True and self.clean(context) is called.

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

No branches or pull requests

1 participant