Add a git submodules sanity check step to the build (#5424)

This commit adds a specific error message to the build that tells people
to restore git submodules if they forgot to read the README.

#5416 was the straw that broke the camel's back.
This commit is contained in:
Mike Griese 2020-04-20 13:11:36 -05:00 committed by GitHub
parent 5740e197c2
commit 56259ea005
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,4 +156,12 @@
<EnablePREfast>true</EnablePREfast>
</ClCompile>
</ItemDefinitionGroup>
<!-- Sanity check: Make sure the user followed the README and initialized git submodules. -->
<Target Name="EnsureSubmodulesExist" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references git submodule(s) that are missing on this computer. Use `git submodule update --init --recursive` to download them. For more information, see https://github.com/microsoft/terminal#building-the-code. </ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\dep\wil') Or !Exists('$(SolutionDir)\dep\gsl')" Text="$([System.String]::Format('$(ErrorText)'))" />
</Target>
</Project>