Skip to content

Add a command to negate the exit code of some other command #173

@Shayan-To

Description

@Shayan-To

I couldn't find any way to do this in a cross-platform way. POSIX shell has the ! operator that can do that, but I couldn't find a way to do it on Windows. It could work like an exec command that negates the exit code of the execution.

Sample use case: Stop a commit using husky if any file contains string DO_NOT_COMMIT_THIS. "pre-commit": "shx not grep -rq DO_NOT_COMMIT_THIS ."

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions