Skip to content

Commit

Permalink
Cherry pick: Fix xamlAsset value (powershell module) (#4240) and Fix …
Browse files Browse the repository at this point in the history
…PowerShellCmdlet (#4247) (#4248)
  • Loading branch information
ryfu-msft committed Mar 7, 2024
1 parent 91d6e81 commit ce2f0c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 11 additions & 5 deletions src/PowerShell/CommonFiles/PowerShellCmdlet.cs
@@ -1,4 +1,4 @@
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// <copyright file="PowerShellCmdlet.cs" company="Microsoft Corporation">
// Copyright (c) Microsoft Corporation. Licensed under the MIT License.
// </copyright>
Expand Down Expand Up @@ -281,6 +281,7 @@ internal void Wait(Task runningTask, PowerShellCmdlet? writeCmdlet = null)
{
try
{
this.pwshThreadEdi = null;
this.pwshThreadAction();
}
catch (Exception e)
Expand Down Expand Up @@ -596,12 +597,17 @@ private void WaitMainThreadActionCompletion()
this.pwshThreadActionCompleted.WaitHandle,
});

if (this.pwshThreadEdi != null)
try
{
this.pwshThreadEdi.Throw();
if (this.pwshThreadEdi != null)
{
this.pwshThreadEdi.Throw();
}
}
finally
{
this.semaphore.Release();
}

this.semaphore.Release();
}

private class QueuedStream
Expand Down
Expand Up @@ -379,10 +379,10 @@ private async Task InstallVCLibsDependenciesAsync()
private async Task InstallUiXamlAsync(string releaseTag)
{
(string xamlPackageName, string xamlReleaseTag) = GetXamlDependencyVersionInfo(releaseTag);
string xamlAssetX64 = string.Format($"{0}.x64.appx", xamlPackageName);
string xamlAssetX86 = string.Format($"{0}.x86.appx", xamlPackageName);
string xamlAssetArm = string.Format($"{0}.arm.appx", xamlPackageName);
string xamlAssetArm64 = string.Format($"{0}.arm64.appx", xamlPackageName);
string xamlAssetX64 = string.Format("{0}.x64.appx", xamlPackageName);
string xamlAssetX86 = string.Format("{0}.x86.appx", xamlPackageName);
string xamlAssetArm = string.Format("{0}.arm.appx", xamlPackageName);
string xamlAssetArm64 = string.Format("{0}.arm64.appx", xamlPackageName);

var uiXamlObjs = this.GetAppxObject(xamlPackageName);
if (uiXamlObjs is null)
Expand Down

0 comments on commit ce2f0c0

Please sign in to comment.