Skip to content

Commit 6103b65

Browse files
committed
Only disable NBGV_GitEngine when necessary
1 parent 6dfee58 commit 6103b65

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/Prime-ForCopilot.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
if ((git rev-parse --is-shallow-repository) -eq 'true')
2+
{
3+
Write-Host "Shallow clone detected, disabling NBGV Git engine so the build can succeed."
4+
$env:NBGV_GitEngine='Disabled'
5+
}

.github/copilot-instructions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## High level guidance
44

55
* Review the `CONTRIBUTING.md` file for instructions to build and test the software.
6-
* Set the `NBGV_GitEngine` environment variable to `Disabled` before running any `dotnet` or `msbuild` commands.
6+
* Run the `.github\Prime-ForCopilot.ps1` script (once) before running any `dotnet` or `msbuild` commands.
7+
If you see any build errors about not finding git objects or a shallow clone, it may be time to run this script again.
78

89
## Software Design
910

0 commit comments

Comments
 (0)