Commit 51cf41d
committed
fix(vcs): detect non-git repos in status commands via stderr check
When git status or rev-parse fails with a non-zero exit code in a
directory that is not a git repository, the stderr contains 'not a git
repository'. Previously the code would throw a GitCommandError with a
generic detail message, which prevented GitManager.isNotGitRepositoryError
from matching and returning isRepo: false.
Add stderr substring checks in readStatusDetailsLocal and
readStatusDetailsRemote to return the non-repository sentinel values,
consistent with listRefs.1 parent c4d0cd4 commit 51cf41d
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1196 | 1196 | | |
1197 | 1197 | | |
1198 | 1198 | | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
1199 | 1202 | | |
1200 | 1203 | | |
1201 | 1204 | | |
| |||
1316 | 1319 | | |
1317 | 1320 | | |
1318 | 1321 | | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
1319 | 1325 | | |
1320 | 1326 | | |
1321 | 1327 | | |
| |||
0 commit comments