Skip to content

Conversation

Aditya-PS-05
Copy link
Contributor

closes #15475

Test Plan

I created tests for 4 scenarios

  • no clear for existing directory
  • no clear for blank directory
  • no clear with clear
  • no clear with allow existing

Comment on lines +122 to +123
if allow_prompt {
match confirm_clear(location, name)? {
Copy link
Member

@zanieb zanieb Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use match allow_prompt.then(|| confirm_clear(..)).flatten() so we don't need to indent the match and repeat the error message construction.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(You might need .transpose()?.flatten() to handle the error still)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved at #15795

@Aditya-PS-05 Aditya-PS-05 closed this by deleting the head repository Sep 11, 2025
zanieb added a commit that referenced this pull request Sep 16, 2025
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

Closes #15485

---------

Co-authored-by: Aditya-PS-05 <[email protected]>
Co-authored-by: Zanie Blue <[email protected]>
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.

Allow uv venv to throw error instead of prompting

3 participants