Skip to content

long() throws an exception when running in a worktree on windows #68

Description

@mesner

When running on windows and within a git worktree, running long() throws the following error

Error: ENOENT: no such file or directory, open 'E:\projects\chartiq\finsemble\finsemble-mono\.git\worktrees\my-test-app\packed-refs'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at Object.long (E:\projects\chartiq\finsemble\finsemble-mono-citrix\packages\api\node_modules\git-rev-sync\index.js:108:31)

This is due to assuming a forward slash directory separator to ignore the worktree directory. I've simply replaced double-backslashes with forward slashes in an incoming PR.

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