Fix build command to work with new compiler

This commit is contained in:
Cj 2024-06-20 19:49:06 -04:00
parent c8b642ee0d
commit 6f294e96ae

View File

@ -15,7 +15,7 @@ public class BuildCommand : ICommand
[CommandParameter(0, IsRequired = false, Description = "the location of your project file")] [CommandParameter(0, IsRequired = false, Description = "the location of your project file")]
public string ProjectJsonPath { get; init; } public string ProjectJsonPath { get; init; }
public ValueTask ExecuteAsync(IConsole console) public async ValueTask ExecuteAsync(IConsole console)
{ {
if (ProjectJsonPath is not null && ProjectJsonPath != string.Empty) if (ProjectJsonPath is not null && ProjectJsonPath != string.Empty)
{ {
@ -23,7 +23,7 @@ public class BuildCommand : ICommand
ProjectManager.LoadProject(ProjectJsonPath); ProjectManager.LoadProject(ProjectJsonPath);
CrossCompiler.StartCrossCompile(); CrossCompiler.StartCrossCompile();
return ValueTask.CompletedTask; return;
} }
console.Output.WriteLine(RegistryHelper.GetRegistryValue<string>("LastLoadedProject")); console.Output.WriteLine(RegistryHelper.GetRegistryValue<string>("LastLoadedProject"));
@ -37,15 +37,15 @@ public class BuildCommand : ICommand
ProjectManager.LoadProject(RegistryHelper.GetRegistryValue<string>("LastLoadedProject"), true); ProjectManager.LoadProject(RegistryHelper.GetRegistryValue<string>("LastLoadedProject"), true);
if (!Validate(console)) { return ValueTask.CompletedTask; } if (!Validate(console)) { return; }
CrossCompiler.StartCrossCompile(); await CrossCompiler.StartCrossCompile();
DataProvider.SaveAppSettings(); DataProvider.SaveAppSettings();
return ValueTask.CompletedTask; return;
} }
return ValueTask.CompletedTask; return;
} }
private bool Validate(IConsole console) private bool Validate(IConsole console)