Skip to content

Error out on --target if specified directory is non-empty unless --force-target is used #13474

@notatallshaw

Description

@notatallshaw

No one seems to understand what --target should do in a non-empty directory and users seem to have assumptions about what it should do, even though lots of warnings are thrown, e.g.

WARNING: Target directory /tmp/z/zz/out/cffi already exists. Specify --upgrade to force replacement.

I believe a better UX would be to error out with a message like:

ERROR: /tmp/z/zz/out is non-empty and the behavior or `--target` is undefined, use `--force-target` to override.

Would this cause too much churn? And is so what are users doing with --target now? Would a deprecation period allow us to find real world use cases and see if there is some behavior we are willing to support?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions