-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When getting the .git/config, it assumes that it's in the work directory:
vscode/src/coverage/coverage.ts
Line 140 in f708fe8
| const gitConfig = Uri.file(`${pathToWorkspace}/.git/config`); |
If somebody like me is a fan of worktrees, they won't have a .git folder in their workspace. Instead, .git will be a text file containing something like this:
gitdir: /home/rasmus/Projects/repo/main/.git/worktrees/branch
When running the codecov extension in a linked worktree, that has such a .git file in lieu of a directory, that will result in the following error:
Error: ENOTDIR: not a directory, open '/home/rasmus/Projects/repo/branch/.git/config'
To Reproduce
Steps to reproduce the behavior:
- Clone a repository
- Run
git worktree add -B branch ../branch - Open
../branchin vscode with the codecov extension enabled
Expected behavior
The codecov extension should correctly resolve the git repository, and work as well in linked worktrees as in main worktrees.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working