diff --git a/tools/OpenConsole.psm1 b/tools/OpenConsole.psm1 index b9c80ce457..1d51f4c5d0 100644 --- a/tools/OpenConsole.psm1 +++ b/tools/OpenConsole.psm1 @@ -416,7 +416,7 @@ function Invoke-CodeFormat() { [switch]$IgnoreXaml ) - $clangFormatPath = & 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -find "**\x64\bin\clang-format.exe" + $clangFormatPath = & 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -prerelease -find "**\x64\bin\clang-format.exe" If ([String]::IsNullOrEmpty($clangFormatPath)) { Write-Error "No Visual Studio-supplied version of clang-format could be found." } diff --git a/tools/runformat.cmd b/tools/runformat.cmd index d9c1d56c73..336ce12237 100644 --- a/tools/runformat.cmd +++ b/tools/runformat.cmd @@ -2,4 +2,4 @@ rem run clang-format on c++ files -powershell -noprofile "import-module %OPENCON_TOOLS%\openconsole.psm1; Invoke-CodeFormat" +pwsh -noprofile -c "import-module %OPENCON_TOOLS%\openconsole.psm1; Invoke-CodeFormat"