Skip to content

Commit 9b88e0a

Browse files
committed
fix: ensure Windows path is not a root path
1 parent dadb4ed commit 9b88e0a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/git/cli.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ async function _diffIndex(
3636
repository: Repository,
3737
options: string[] = []
3838
): Promise<Array<string>> {
39-
const cwd = repository.rootUri.path;
39+
let cwd = repository.rootUri.path;
40+
// Hack to make handle Windows path from rootUri, since it should not appear as a root path.
41+
cwd = cwd.replace("/c:/", "c:/");
42+
4043
const cmd = "diff-index";
4144
const fullOptions = [
4245
"--name-status",

0 commit comments

Comments
 (0)