Skip to content

publish-crates: Handle folder cleanup on non-CI environments #33

@joao-paulo-parity

Description

@joao-paulo-parity

Problem

The rm: cannot remove XXX: Directory not empty message is misleading. The error occurs not because the directory has something in it, but because some process is attached to a file within the directory, which makes it so it cannot be removed. See for instance https://stackoverflow.com/questions/64852408/cannot-remove-git-directory-not-empty.

Solution

During the cleanup procedure of publish-crates, for non-CI environments, first use fuser to kill all processes attached to files within the $tmp directory, then proceed with rm.


#32 (comment) for context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions