Skip to content

[Code scan] Make clean_build.sh succeed when no shared libraries exist #28

Description

@njzjz

This issue comes from a Codex global scan of deepmodeling/tbplas at commit 4d3652b.

Severity: Low

clean_build.sh pipes find . -name "*.so" into xargs rm. On a clean tree with no shared libraries, xargs still runs rm with no operands, causing the script to exit nonzero.

Code reference:

#! /bin/bash
# Clean local build and so files
test -d build && rm -rf build
find . -name "*.so" | xargs rm

Suggested fix: use find . -name "*.so" -delete, or xargs -r rm where GNU xargs is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions