From 047a899ea28f1579abaca47c222167be700cdafc Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 19 May 2022 10:46:06 -0700 Subject: [PATCH] Revert modifications caused by Code's test run VS Code 1.67.0 and up now modify the local `package.json` file during test run. Because we first run our tests in CI and then package our extension, this modification gets saved into the extension package. We need to check the file back out from Git after the test run. --- vscode-powershell.build.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index c8e0ffae45..845724feba 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -118,6 +118,8 @@ task Build Restore, { task Test -If (!($env:TF_BUILD -and $global:IsLinux)) Build, { Write-Host "`n### Running extension tests" -ForegroundColor Green exec { & npm run test } + # Reset the state of files modified by tests + exec { git checkout package.json test/.vscode/settings.json} } task TestEditorServices -If (Get-EditorServicesPath) {