Skip to content

Post-merge hook fails on searching for deleted directories on Mac #7

Description

@TV4Fun

The version of xargs that comes with macOS does not support the -d option, which means that the line in post-merge:

dirsToCheck="$(echo "$changedFiles" | xargs -d '\n' dirname | sort -u)"

when run on macOS causes the script to fail with

xargs: illegal option -- d
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements] [-S replsize]]

I'm not sure what the best fix is for this. It seems like the de-duping before searching for empty directories isn't really necessary anyway, as a directory can only be deleted once, and this reduces cross-platform compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions