Skip to content

Commit 2d4b362

Browse files
committed
docs: update debugging.md
1 parent 440958c commit 2d4b362

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

docs/development/advanced/debugging.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This snippet of code can be used to for testing that a basic command works witho
1313
async function _test(repository: Repository) {
1414
vscode.window.showInformationMessage("Testing")
1515

16-
let cwd = repository.rootUri.path;
16+
let cwd = repository.rootUri.fsPath;
1717

1818
vscode.window.showInformationMessage(cwd)
1919

@@ -28,10 +28,4 @@ This was prompted by issue [#93](https://github.com/MichaelCurrin/auto-commit-ms
2828

2929
The output in the debug mode did not work because the shell command failed to spawn at all using `exec()` in Node.
3030

31-
I printed the `cwd` value in the VS Code info box using code above. I realized that when it was used with `git` in `cmd` on Windows that the path was not valid. Showing as `/c:/...` with a leading forward-slash appropriate for Linux/macOS but not Windows `cmd`.
32-
33-
This is the temporary hack until the `vscode` library has a fix:
34-
35-
```typescript
36-
cwd = cwd.replace("/c:/", "c:/")
37-
```
31+
The `cwd` value was incorrect from the existing logs which I didn't notice initially but using the test above made it clear.

0 commit comments

Comments
 (0)