Skip to content

the rm ... -rf will always fail on windows #2704

Closed

Description

@trim21

Description

❯❯ ~/proj/bencode-py (master ~1) task meson
task: [meson] rm build -rf
task: Failed to run task "meson": coreutils: remove C:\Users\Trim21\proj\bencode-py\build: The directory is not empty.
❯❯ ~/proj/bencode-py (master ~1) task meson
task: [meson] rm build -r -f
task: Failed to run task "meson": coreutils: remove C:\Users\Trim21\proj\bencode-py\build: The directory is not empty.
❯❯ ~/proj/bencode-py (master ~1) rm .\build -Recurse -Force
❯❯ ~/proj/bencode-py (master ~1) task meson
task: [meson] rm build -r -f
task: Failed to run task "meson": coreutils: remove C:\Users\Trim21\proj\bencode-py\build: The system cannot find the file specified.

Version

3.48.0

Operating system

windows

Experiments Enabled

No response

Example Taskfile

version: 3

tasks:
  meson:
    - rm build -rf

Activity

  1. changed the title [-]them `rm ... -rf` will always fail on windows[/-] [+]the `rm ... -rf` will always fail on windows[/+] on Feb 22, 2026
  2. trulede commented on Feb 22, 2026

    @trulede
    Contributor

    Duplicate of #2506 ? Not sure if the fix for that is in the latest release of Task.

  3. trim21 commented on Feb 22, 2026

    @trim21
    ContributorAuthor

    Duplicate of #2506 ? Not sure if the fix for that is in the latest release of Task.

    reproducable in latest nightly release

  4. trulede commented on Feb 22, 2026

    @trulede
    Contributor

    The fix is in a dependency, so it depends if that is also updated.

  5. trim21 commented on Feb 22, 2026

    @trim21
    ContributorAuthor

    The fix is in a dependency, so it depends if that is also updated.

    It's 16 hours again so I think it's included? https://github.com/go-task/task/releases/tag/nightly

  6. trim21 commented on Feb 22, 2026

    @trim21
    ContributorAuthor

    Duplicate of #2506 ? Not sure if the fix for that is in the latest release of Task.

    Even this is fixed, there is another case that it should not throw a error

  7. trulede commented on Mar 22, 2026

    @trulede
    Contributor

    The command should be: rm -rf build

    Can you please try it.

  8. added theissue type on Mar 22, 2026
  9. trim21 commented on Mar 22, 2026

    @trim21
    ContributorAuthor

    I don't quiet understand, do we only support BSD style flag but not GNU style flags?

  10. added
    state: working as intendedThe issue described is working as originally intended.
    and removed
    state: needs triageWaiting to be triaged by a maintainer.
    on Apr 13, 2026
  11. trulede commented on Apr 13, 2026

    @trulede
    Contributor

    The problem is where you placed the "build".

    NAME
    rm - remove files or directories

    SYNOPSIS
    rm [OPTION]... [FILE]...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: working as intendedThe issue described is working as originally intended.

    Fields

    No fields configured for support.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions