Skip to content

Add --interactive flag to crufty clean for per-artifact confirmation #5

@EncodePanda

Description

@EncodePanda

Description

Introduce an --interactive flag to the crufty clean command, enabling users to confirm the deletion of each detected artifact individually.

Current Behavior

Running crufty clean deletes all detected artifacts without user confirmation:

crufty clean

Proposed Enhancement

With the --interactive flag, prompt the user for confirmation before deleting each artifact:

crufty clean --interactive

For each artifact, display a prompt

Delete artifact: path/to/artifact.txt? [y/N]

Only artifacts confirmed with 'yes' are deleted.

Implementation Details

  • Default Behavior: Without the flag, all artifacts are deleted without prompts.
  • Interactive Mode: When the flag is present, use the dialoguer crate to prompt the user for each artifact.
  • Prompt Behavior: The prompt should wait for the user to press Enter after typing 'y' or 'n'.
  • Default Choice: If the user presses Enter without typing 'y' or 'n', treat it as a 'no' response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions