Skip to content

Commit 22fed1a

Browse files
committed
Update build documentation to include platyPS requirement
Since it's always used post-build to generate the documentation, we have a `#requires` for it but forgot to add it to the documentation. Also suppress stderr for sysctl when checking if macOS is an Intel or Arm processor. On the former, it doesn't know what field we're querying.
1 parent d4b6425 commit 22fed1a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

PowerShellEditorServices.build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ $script:dotnetTestArgs = @("test") + $script:dotnetBuildArgs + $TestArgs + @(
4242
$script:IsNix = $IsLinux -or $IsMacOS
4343
# For Apple M1, pwsh might be getting emulated, in which case we need to check
4444
# for the proc_translated flag, otherwise we can check the architecture.
45-
$script:IsAppleM1 = $IsMacOS -and ((sysctl -n sysctl.proc_translated) -eq 1 -or (uname -m) -eq "arm64")
45+
$script:IsAppleM1 = $IsMacOS -and ((sysctl -n sysctl.proc_translated 2> $null) -eq 1 -or
46+
[System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture -eq "Arm64")
4647
$script:IsArm64 = -not $script:IsNix -and @("ARM64") -contains $env:PROCESSOR_ARCHITECTURE
4748
$script:BuildInfoPath = [System.IO.Path]::Combine($PSScriptRoot, "src", "PowerShellEditorServices.Hosting", "BuildInfo.cs")
4849
$script:PsesCommonProps = [xml](Get-Content -Raw "$PSScriptRoot/PowerShellEditorServices.Common.props")
@@ -272,7 +273,6 @@ Task LayoutModule -After Build {
272273
}
273274

274275
# Assemble the PowerShellEditorServices.VSCode module
275-
276276
foreach ($vscodeComponent in Get-ChildItem $script:VSCodeOutput) {
277277
if (-not $includedDlls.Contains($vscodeComponent.Name)) {
278278
Copy-Item -Path $vscodeComponent.FullName -Destination $psesVSCodeBinOutputPath -Force

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ git clone https://github.com/PowerShell/PowerShellEditorServices.git
159159

160160
```powershell
161161
Install-Module InvokeBuild -Scope CurrentUser
162+
Install-Module platyPS -Scope CurrentUser
162163
```
163164

164165
Now you're ready to build the code. You can do so in one of two ways:

0 commit comments

Comments
 (0)