Skip to content

Bug with directory symlinks in git #78

Description

@baxelrod-bdai

If the repo has a symlink to a directory which is checked into git, this tool crashes when the -g flag is used. Here is a minimal example to reproduce:

mkdir foo
ln -s foo bar
github-codeowners audit        # works
github-codeowners audit -g     # works
git add foo bar
git commit
github-codeowners audit        # works
github-codeowners audit -g     # FAILS

The error is:

failed to read lines from file bar [Error: EISDIR: illegal operation on a directory, read] {
  errno: -21,
  code: 'EISDIR',
  syscall: 'read'
}
failed to run audit command [Error: EISDIR: illegal operation on a directory, read] {
  errno: -21,
  code: 'EISDIR',
  syscall: 'read'
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions