From 8508ffaaf97a200fe6e8588333c6ab1383687d4f Mon Sep 17 00:00:00 2001 From: 5an7y Date: Tue, 31 Mar 2026 16:02:08 -0700 Subject: refactor: remove Github RunMode NuGet mode works correctly for GitHub Actions (the HTML open is already guarded by [Environment]::UserInteractive which is false on CI runners). The Github mode was redundant and is removed to keep the interface clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- BuildEnvironment.ps1 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'BuildEnvironment.ps1') diff --git a/BuildEnvironment.ps1 b/BuildEnvironment.ps1 index 285f3d7e..08f0469e 100644 --- a/BuildEnvironment.ps1 +++ b/BuildEnvironment.ps1 @@ -122,11 +122,10 @@ function Resolve-BuildEnvironment { Detects or resolves the active build environment and returns metadata. .DESCRIPTION When RunMode is 'Auto', checks in priority order: NuGet, EWDK, WDK. - When RunMode is 'Github', behaves identically to 'NuGet' and sets IsGithubMode. When RunMode is explicitly set to WDK/NuGet/EWDK, skips detection and uses that mode. Pass the VsInstallation returned by Initialize-DevShell to avoid prompting the user a second time when multiple VS installations are present. - Returns a hashtable: Name, BuildNumber (int), NuGetVersion, WdkVsComponentVersion, IsGithubMode. + Returns a hashtable: Name, BuildNumber (int), NuGetVersion, WdkVsComponentVersion. #> param( [string]$RepoRoot, @@ -139,12 +138,9 @@ function Resolve-BuildEnvironment { BuildNumber = [int]0 NuGetVersion = '' WdkVsComponentVersion = '' - IsGithubMode = $false } - # Resolve effective mode for Github (same path as NuGet) - $effectiveMode = if ($RunMode -eq 'Github') { 'NuGet' } else { $RunMode } - if ($RunMode -eq 'Github') { $result.IsGithubMode = $true } + $effectiveMode = $RunMode # --- Resolve build environment --- if ($effectiveMode -eq 'NuGet' -or -- cgit v1.3.1