Skip to content

Commit f5aff05

Browse files
authored
Fix IndexCreationTool not propagating signtool/makeappx error exit codes
1 parent e94ef7c commit f5aff05

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.nuget/nuget.exe

8.08 MB
Binary file not shown.

src/WinGetSourceCreator/Helpers.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,7 @@ public static void Unpack(string package, string outDir)
8686
string pathToSDK = SDKDetector.Instance.LatestSDKBinPath;
8787
string makeappxExecutable = Path.Combine(pathToSDK, "makeappx.exe");
8888
string args = $"unpack /nv /p \"{package}\" /d \"{outDir}\"";
89-
Process p = new Process
90-
{
91-
StartInfo = new ProcessStartInfo(makeappxExecutable, args)
92-
};
93-
p.Start();
94-
p.WaitForExit();
89+
RunCommand(makeappxExecutable, args);
9590
}
9691

9792
public static void PackWithMappingFile(string outputPackage, string mappingFile)
@@ -138,6 +133,11 @@ public static void RunCommand(string command, string args, string? workingDirect
138133
}
139134
p.Start();
140135
p.WaitForExit();
136+
137+
if (p.ExitCode != 0)
138+
{
139+
throw new Exception($"Command failed with exit code {p.ExitCode}: {command} {args}");
140+
}
141141
}
142142

143143
// If in the future we edit more elements, this should be a nice wrapper class.

0 commit comments

Comments
 (0)