mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 10:39:01 +08:00
aa60b7efa5
This reduces bootstrap cost for Windows customers, resolving the issue initially submitted as #12502 . The `toolsrc` tree was extracted to https://github.com/microsoft/vcpkg-tool. `bootstrap.sh` was changed to download the right source tarball, extract, and build it. This was chosen over the previous attempt, a submodule, over concerns of accidentally destroying people's local modifications.
20 lines
594 B
PowerShell
20 lines
594 B
PowerShell
[CmdletBinding(PositionalBinding=$False)]
|
|
Param(
|
|
[Parameter(Mandatory=$True)]
|
|
[String]$DiffFile
|
|
)
|
|
|
|
Start-Process -FilePath 'git' -ArgumentList 'diff' `
|
|
-NoNewWindow -Wait `
|
|
-RedirectStandardOutput $DiffFile
|
|
if (0 -ne (Get-Item -LiteralPath $DiffFile).Length)
|
|
{
|
|
$msg = @(
|
|
'The formatting of the files in the repo were not what we expected,',
|
|
'or the documentation was not regenerated.',
|
|
'Please access the diff from format.diff in the build artifacts,'
|
|
'and apply the patch with `git apply`'
|
|
)
|
|
Write-Error ($msg -join "`n")
|
|
throw
|
|
} |