Skip to content

rm -rf does not continue if file does not exist #3969

@glass-ships

Description

@glass-ships

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

With a pixi task such as
clean = { cmd = "rm -rf **/*.egg-info **/dist" }

$ pixi run clean
✨ Pixi task (clean in default): rm -rf **/*.egg-info **/dist: 
glob: no matches found '/home/.../python_project_template/**/*.egg-info'

even if **/dist does return a match, it will not be deleted because it failed on **/*.egg-info

Issue description

-f flag for rm does not behave consistently with GNU Bash for example.

-f, --force
    ignore nonexistent files, never prompt

Expected behavior

rm -rf non-existent-file-or-folder
should proceed silently and without failure if file/folder not found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions