Skip to content

Commit 929bd1c

Browse files
MuyuanMSCopilot
andcommitted
Log warning instead of silently returning when manifest file missing
Address review feedback: when the PowerToys manifest yml file is not found, log a warning with the expected path so the issue is diagnosable, rather than silently returning and leaving the user with an empty shortcuts page. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 842854a commit 929bd1c

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

installer/PowerToysSetupVNext/BaseApplications.wxs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<?include $(sys.CURRENTDIR)\Common.wxi?>
44

5-
<?define BaseApplicationsFiles=?>
5+
<?define BaseApplicationsFiles=PowerToys.MouseJump.Common.deps.json;PowerToys.MouseJump.Common.dll?>
66
<?define BaseApplicationsFilesPath=$(var.BinDir)\?>
77

88
<Fragment>
@@ -17,12 +17,22 @@
1717
</DirectoryRef>
1818
<DirectoryRef Id="INSTALLFOLDER">
1919
<!-- Generated by generateFileComponents.ps1 -->
20-
<!--BaseApplicationsFiles_Component_Def-->
20+
21+
<Component Id="BaseApplicationsFiles_Component" Guid="77A1D32F-2675-4D35-8638-CB3180D28EDB">
22+
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
23+
<RegistryValue Type="string" Name="BaseApplicationsFiles_Component" Value="" KeyPath="yes"/>
24+
</RegistryKey>
25+
<File Id="BaseApplicationsFiles_File_PowerToys.MouseJump.Common.deps.json" Source="$(var.BaseApplicationsFilesPath)\PowerToys.MouseJump.Common.deps.json" />
26+
<File Id="BaseApplicationsFiles_File_PowerToys.MouseJump.Common.dll" Source="$(var.BaseApplicationsFilesPath)\PowerToys.MouseJump.Common.dll" />
27+
</Component>
28+
2129
</DirectoryRef>
2230

2331
<ComponentGroup Id="BaseApplicationsComponentGroup">
2432
<ComponentRef Id="Microsoft_CommandPalette_Extensions_winmd" />
33+
<ComponentRef Id="BaseApplicationsFiles_Component" />
2534
</ComponentGroup>
2635

2736
</Fragment>
2837
</Wix>
38+

installer/PowerToysSetupVNext/KeyboardManager.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
22

33
<?include $(sys.CURRENTDIR)\Common.wxi?>
44

installer/PowerToysSetupVNext/PowerDisplay.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
</ComponentGroup>
2727

2828
</Fragment>
29-
</Wix>
29+
</Wix>

src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/PowerToysShortcutsPopulator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Linq;
99
using System.Text;
1010
using System.Text.RegularExpressions;
11+
using ManagedCommon;
1112
using Microsoft.PowerToys.Settings.UI.Library;
1213
using static ShortcutGuide.Helpers.ResourceLoaderInstance;
1314

@@ -27,6 +28,7 @@ public static void Populate()
2728

2829
if (!File.Exists(path))
2930
{
31+
Logger.LogWarning($"PowerToys manifest file not found: '{path}'. PowerToys-specific shortcuts will not appear in ShortcutGuide.");
3032
return;
3133
}
3234

0 commit comments

Comments
 (0)