internal static async Task ExtractArchiveAsync(string archivePath, DirectoryInfo outputDirectory, ProcessPriorityClass priority)
        {
            string executablePath = await StandaloneExecutablePath.Value.ConfigureAwait(false);

            int exitCode = await ProcessRunner.RunProcessAsync(executablePath, priority, "x", "-o" + outputDirectory.FullName, archivePath);

            if (exitCode != 0)
            {
                throw new Exception("Extraction failed with exit code " + exitCode.ToString(CultureInfo.InvariantCulture));
            }
        }
Esempio n. 2
0
 protected override Task DispatchAsyncCore(SetupContext context, CancellationToken cancellationToken) =>
 ProcessRunner.RunProcessAsync(context.ResolveFile(this.ExecutablePath).FullName,
                               ProcessPriorityClass.Normal,
                               this.Arguments.Select(arg => GetArgument(arg, context)).ToArray());