Skip to content

RemoveDir Task should error or prompt for confirmation when provided Directories argument is empty #4105

Open
@shahabhijeet

Description

@shahabhijeet

Steps to reproduce

<RemoveDir Directories="$(My_local_DirPath)\" />

If at runtime $(My_Local_DirPath) is empty

RemoveDir will actually execute and print this on console
Removing Directory "\" and will delete the entire root.

Suggestion:

  1. Prompt user if they really want to delete in this particular scenario
  2. Or introduce a new parameter for RemoveDir task
    NoPrompt
    or
    Force

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: TasksIssues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions