Actually use the --outputPath compile option if the user provides one

It was just not being used, defaulting to the parent of installPath. it
still does, if the user does not specify a directory using --outputPath
This commit is contained in:
Marco Antonio Jaguaribe Costa 2023-10-25 04:32:02 -03:00
parent 7baf3d5d12
commit f2a2ae40ea

View File

@ -11,6 +11,7 @@ using Wabbajack.Downloaders.GameFile;
using Wabbajack.DTOs.JsonConverters; using Wabbajack.DTOs.JsonConverters;
using Wabbajack.Networking.WabbajackClientApi; using Wabbajack.Networking.WabbajackClientApi;
using Wabbajack.Paths; using Wabbajack.Paths;
using Wabbajack.Paths.IO;
using Wabbajack.VFS; using Wabbajack.VFS;
namespace Wabbajack.CLI.Verbs; namespace Wabbajack.CLI.Verbs;
@ -58,6 +59,12 @@ public class Compile
inferredSettings.UseGamePaths = true; inferredSettings.UseGamePaths = true;
if(outputPath.DirectoryExists())
{
inferredSettings.OutputFile = outputPath.Combine(inferredSettings.OutputFile.FileName);
_logger.LogInformation("Output file will be in: {outputPath}", inferredSettings.OutputFile);
}
var compiler = MO2Compiler.Create(_serviceProvider, inferredSettings); var compiler = MO2Compiler.Create(_serviceProvider, inferredSettings);
var result = await compiler.Begin(token); var result = await compiler.Begin(token);
if (!result) if (!result)