From 1629ed3c72484c6f4855f2e990dcfb45cb59b202 Mon Sep 17 00:00:00 2001 From: Eduardo Assis Date: Sun, 2 Feb 2025 14:49:27 -0300 Subject: [PATCH] refactor: code clean-up, add SystemInfo into ExecutionContext --- GodotEnv.Tests/reports/method_coverage.svg | 2 +- GodotEnv.Tests/src/MainTest.cs | 4 +++- GodotEnv.Tests/src/common/models/ExecutionContextTest.cs | 5 ++++- .../src/features/addons/commands/AddonsCommandTest.cs | 4 ++-- .../addons/commands/install/AddonsInstallCommandTest.cs | 4 ++-- .../src/features/godot/commands/GodotListCommandTest.cs | 2 +- .../src/features/godot/domain/GodotRepositoryTest.cs | 2 +- GodotEnv/src/Main.cs | 3 +++ GodotEnv/src/common/models/ExecutionContext.cs | 9 +++++---- GodotEnv/src/common/models/OSFamily.cs | 1 + GodotEnv/src/common/utilities/ProcessRunner.cs | 2 -- GodotEnv/src/common/utilities/SystemInfo.cs | 3 +++ GodotEnv/src/features/addons/commands/AddonsCommand.cs | 4 +--- .../features/addons/commands/init/AddonsInitCommand.cs | 4 +--- .../addons/commands/install/AddonsInstallCommand.cs | 4 +--- GodotEnv/src/features/godot/commands/GodotCommand.cs | 4 +--- GodotEnv/src/features/godot/commands/GodotListCommand.cs | 3 +-- GodotEnv/src/features/godot/commands/GodotUseCommand.cs | 3 +-- .../godot/commands/cache/GodotCacheClearCommand.cs | 5 ++--- .../features/godot/commands/cache/GodotCacheCommand.cs | 4 +--- .../src/features/godot/commands/env/GodotEnvCommand.cs | 4 +--- .../features/godot/commands/env/GodotEnvGetCommand.cs | 4 +--- .../features/godot/commands/env/GodotEnvPathCommand.cs | 4 +--- .../features/godot/commands/env/GodotEnvSetupCommand.cs | 3 +-- .../features/godot/commands/env/GodotEnvTargetCommand.cs | 3 +-- .../godot/commands/install/GodotInstallCommand.cs | 3 +-- .../godot/commands/install/GodotUninstallCommand.cs | 3 +-- GodotEnv/src/features/godot/domain/GodotRepository.cs | 1 - 28 files changed, 42 insertions(+), 55 deletions(-) diff --git a/GodotEnv.Tests/reports/method_coverage.svg b/GodotEnv.Tests/reports/method_coverage.svg index c3c2476..65d07e8 100644 --- a/GodotEnv.Tests/reports/method_coverage.svg +++ b/GodotEnv.Tests/reports/method_coverage.svg @@ -102,7 +102,7 @@ Coverage - 57.8%57.8% + 57.7%57.7% diff --git a/GodotEnv.Tests/src/MainTest.cs b/GodotEnv.Tests/src/MainTest.cs index aeaff5d..6ebf9b3 100644 --- a/GodotEnv.Tests/src/MainTest.cs +++ b/GodotEnv.Tests/src/MainTest.cs @@ -2,6 +2,7 @@ namespace Chickensoft.GodotEnv.Tests; using System.Threading.Tasks; using Chickensoft.GodotEnv.Common.Models; +using global::GodotEnv.Common.Utilities; using Moq; using Shouldly; using Xunit; @@ -18,10 +19,11 @@ public void CreateExecutionContextParsesArgs() { var config = new ConfigFile(); var args = new string[] { "a", "--", "b" }; var workingDir = "/"; + var systemInfo = new Mock(); var addonsContext = new Mock(); var godotContext = new Mock(); var context = GodotEnv.CreateExecutionContext( - args, config, workingDir, addonsContext.Object, + args, config, workingDir, systemInfo.Object, addonsContext.Object, godotContext.Object ); context.CliArgs.ShouldBe(["a"]); diff --git a/GodotEnv.Tests/src/common/models/ExecutionContextTest.cs b/GodotEnv.Tests/src/common/models/ExecutionContextTest.cs index beaa911..f66907b 100644 --- a/GodotEnv.Tests/src/common/models/ExecutionContextTest.cs +++ b/GodotEnv.Tests/src/common/models/ExecutionContextTest.cs @@ -17,6 +17,7 @@ public class ExecutionContextTest { [Fact] public void Initializes() { var config = new ConfigFile(); + var systemInfo = new MockSystemInfo(OSType.Linux, CPUArch.X64); var addons = new Mock().Object; var godot = new Mock().Object; @@ -25,6 +26,7 @@ public void Initializes() { CommandArgs: _commandArgs, Version: VERSION, WorkingDir: WORKING_DIR, + SystemInfo: systemInfo, Config: config, Addons: addons, Godot: godot @@ -34,12 +36,13 @@ public void Initializes() { executionContext.CommandArgs.ShouldBe(_commandArgs); executionContext.Version.ShouldBe(VERSION); executionContext.WorkingDir.ShouldBe(WORKING_DIR); + executionContext.SystemInfo.ShouldBe(systemInfo); executionContext.Config.ShouldBe(config); executionContext.Addons.ShouldBe(addons); executionContext.Godot.ShouldBe(godot); executionContext - .CreateLog(new MockSystemInfo(OSType.Linux, CPUArch.X64), new FakeInMemoryConsole()) + .CreateLog(new FakeInMemoryConsole()) .ShouldBeAssignableTo(); } } diff --git a/GodotEnv.Tests/src/features/addons/commands/AddonsCommandTest.cs b/GodotEnv.Tests/src/features/addons/commands/AddonsCommandTest.cs index 94d7973..6bda484 100644 --- a/GodotEnv.Tests/src/features/addons/commands/AddonsCommandTest.cs +++ b/GodotEnv.Tests/src/features/addons/commands/AddonsCommandTest.cs @@ -18,8 +18,8 @@ public async Task Executes() { var console = new FakeInMemoryConsole(); var log = new Log(systemInfo, console); // Use real log to test colors in output - context.Setup(ctx => ctx.Godot.Platform.SystemInfo).Returns(systemInfo); - context.Setup(ctx => ctx.CreateLog(systemInfo, console)).Returns(log); + context.Setup(ctx => ctx.SystemInfo).Returns(systemInfo); + context.Setup(ctx => ctx.CreateLog(console)).Returns(log); var addonCommand = new AddonsCommand(context.Object); await addonCommand.ExecuteAsync(console); diff --git a/GodotEnv.Tests/src/features/addons/commands/install/AddonsInstallCommandTest.cs b/GodotEnv.Tests/src/features/addons/commands/install/AddonsInstallCommandTest.cs index d8efc76..21b19fb 100644 --- a/GodotEnv.Tests/src/features/addons/commands/install/AddonsInstallCommandTest.cs +++ b/GodotEnv.Tests/src/features/addons/commands/install/AddonsInstallCommandTest.cs @@ -51,8 +51,8 @@ out ILog log var workingDir = "/"; - context.Setup(context => context.Godot.Platform.SystemInfo).Returns(systemInfo.Object); - context.Setup(context => context.CreateLog(systemInfo.Object, fakeConsole)).Returns(log); + context.Setup(context => context.SystemInfo).Returns(systemInfo.Object); + context.Setup(context => context.CreateLog(fakeConsole)).Returns(log); context.Setup(context => context.WorkingDir).Returns(workingDir); var addonsFileRepo = new Mock(); diff --git a/GodotEnv.Tests/src/features/godot/commands/GodotListCommandTest.cs b/GodotEnv.Tests/src/features/godot/commands/GodotListCommandTest.cs index 9477945..06df7e2 100644 --- a/GodotEnv.Tests/src/features/godot/commands/GodotListCommandTest.cs +++ b/GodotEnv.Tests/src/features/godot/commands/GodotListCommandTest.cs @@ -38,7 +38,7 @@ public GodotListCommandTest() { _godotContext.Setup(c => c.Platform).Returns(_environment.Object); _context.SetupGet(context => context.Godot).Returns(_godotContext.Object); _log = new Log(_systemInfo, _console); - _context.Setup(context => context.CreateLog(_systemInfo, _console)).Returns(_log); + _context.Setup(context => context.CreateLog(_console)).Returns(_log); } public void Dispose() => _console.Dispose(); diff --git a/GodotEnv.Tests/src/features/godot/domain/GodotRepositoryTest.cs b/GodotEnv.Tests/src/features/godot/domain/GodotRepositoryTest.cs index 6fd3e68..b415a14 100644 --- a/GodotEnv.Tests/src/features/godot/domain/GodotRepositoryTest.cs +++ b/GodotEnv.Tests/src/features/godot/domain/GodotRepositoryTest.cs @@ -60,7 +60,7 @@ public async Task AddOrUpdateGodotEnvVariable() { var console = new FakeInMemoryConsole(); var log = new Mock(); // Use real log to test colors in output - executionContext.Setup(context => context.CreateLog(systemInfo, console)).Returns(log.Object); + executionContext.Setup(context => context.CreateLog(console)).Returns(log.Object); await godotRepo.AddOrUpdateGodotEnvVariable(log.Object); diff --git a/GodotEnv/src/Main.cs b/GodotEnv/src/Main.cs index 7f57ef4..b69c262 100644 --- a/GodotEnv/src/Main.cs +++ b/GodotEnv/src/Main.cs @@ -123,6 +123,7 @@ public static async Task Main(string[] args) { args: args, config: config, workingDir: workingDir, + systemInfo: systemInfo, addonsContext: addonsContext, godotContext: godotContext ); @@ -157,6 +158,7 @@ internal static ExecutionContext CreateExecutionContext( string[] args, ConfigFile config, string workingDir, + ISystemInfo systemInfo, IAddonsContext addonsContext, IGodotContext godotContext ) { @@ -198,6 +200,7 @@ IGodotContext godotContext Version: version, WorkingDir: workingDir, Config: config, + SystemInfo: systemInfo, Addons: addonsContext, Godot: godotContext ); diff --git a/GodotEnv/src/common/models/ExecutionContext.cs b/GodotEnv/src/common/models/ExecutionContext.cs index 39a8f94..6f34ff5 100644 --- a/GodotEnv/src/common/models/ExecutionContext.cs +++ b/GodotEnv/src/common/models/ExecutionContext.cs @@ -25,6 +25,8 @@ public interface IExecutionContext { /// App configuration settings. ConfigFile Config { get; } + /// System information. + ISystemInfo SystemInfo { get; } /// Addons context. IAddonsContext Addons { get; } /// Godot context. @@ -33,8 +35,7 @@ public interface IExecutionContext { /// Creates a log using the specified console. /// Output console. /// Log. - ILog CreateLog(ISystemInfo systemInfo, IConsole console); - // ILog CreateLog(IConsole console, IGodotEnvironment environment); + ILog CreateLog(IConsole console); } public record ExecutionContext( @@ -43,9 +44,9 @@ public record ExecutionContext( string Version, string WorkingDir, ConfigFile Config, + ISystemInfo SystemInfo, IAddonsContext Addons, IGodotContext Godot ) : IExecutionContext { - public ILog CreateLog(ISystemInfo systemInfo, IConsole console) => new Log(systemInfo, console); - // public ILog CreateLog(IConsole console, IGodotEnvironment environment) => new Log(console, environment); + public ILog CreateLog(IConsole console) => new Log(SystemInfo, console); } diff --git a/GodotEnv/src/common/models/OSFamily.cs b/GodotEnv/src/common/models/OSFamily.cs index f8d2667..71aac99 100644 --- a/GodotEnv/src/common/models/OSFamily.cs +++ b/GodotEnv/src/common/models/OSFamily.cs @@ -8,5 +8,6 @@ public enum OSFamily { Windows = 0, /// Unix. Unix = 1, + /// Unknown. Unknown = 2, } diff --git a/GodotEnv/src/common/utilities/ProcessRunner.cs b/GodotEnv/src/common/utilities/ProcessRunner.cs index 73f6bc4..2bd9289 100644 --- a/GodotEnv/src/common/utilities/ProcessRunner.cs +++ b/GodotEnv/src/common/utilities/ProcessRunner.cs @@ -100,8 +100,6 @@ public async Task RunElevatedOnWindows( // doesn't have admin rights bool shouldElevate = !UACHelper.UACHelper.IsElevated; - // Console.WriteLine($"cmd '{exe}', args '{args}'"); - Process process = UACHelper.UACHelper.StartElevated(new ProcessStartInfo() { FileName = exe, Arguments = args, diff --git a/GodotEnv/src/common/utilities/SystemInfo.cs b/GodotEnv/src/common/utilities/SystemInfo.cs index 8db9b05..547e098 100644 --- a/GodotEnv/src/common/utilities/SystemInfo.cs +++ b/GodotEnv/src/common/utilities/SystemInfo.cs @@ -4,6 +4,9 @@ namespace GodotEnv.Common.Utilities; using System.Runtime.InteropServices; using Chickensoft.GodotEnv.Common.Models; +/// +/// Imutable system information (OS, CPU architecture, ...). +/// public interface ISystemInfo { public OSType OS { get; } diff --git a/GodotEnv/src/features/addons/commands/AddonsCommand.cs b/GodotEnv/src/features/addons/commands/AddonsCommand.cs index e56bff8..22e7c8c 100644 --- a/GodotEnv/src/features/addons/commands/AddonsCommand.cs +++ b/GodotEnv/src/features/addons/commands/AddonsCommand.cs @@ -15,9 +15,7 @@ public AddonsCommand(IExecutionContext context) { } public ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var output = console.Output; log.Print(""); log.Warn("Please use a subcommand to manage addons."); diff --git a/GodotEnv/src/features/addons/commands/init/AddonsInitCommand.cs b/GodotEnv/src/features/addons/commands/init/AddonsInitCommand.cs index 7963b0e..a3ba6c1 100644 --- a/GodotEnv/src/features/addons/commands/init/AddonsInitCommand.cs +++ b/GodotEnv/src/features/addons/commands/init/AddonsInitCommand.cs @@ -22,9 +22,7 @@ public AddonsInitCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var repo = ExecutionContext.Addons.AddonsFileRepo; log.Print(""); diff --git a/GodotEnv/src/features/addons/commands/install/AddonsInstallCommand.cs b/GodotEnv/src/features/addons/commands/install/AddonsInstallCommand.cs index d7144b6..ee647f7 100644 --- a/GodotEnv/src/features/addons/commands/install/AddonsInstallCommand.cs +++ b/GodotEnv/src/features/addons/commands/install/AddonsInstallCommand.cs @@ -41,9 +41,7 @@ public AddonsInstallCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var addons = ExecutionContext.Addons; diff --git a/GodotEnv/src/features/godot/commands/GodotCommand.cs b/GodotEnv/src/features/godot/commands/GodotCommand.cs index 7ba049b..782ed1d 100644 --- a/GodotEnv/src/features/godot/commands/GodotCommand.cs +++ b/GodotEnv/src/features/godot/commands/GodotCommand.cs @@ -15,9 +15,7 @@ public GodotCommand(IExecutionContext context) { } public ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var output = console.Output; log.Print(""); log.Warn("Please use a subcommand to manage Godot installations."); diff --git a/GodotEnv/src/features/godot/commands/GodotListCommand.cs b/GodotEnv/src/features/godot/commands/GodotListCommand.cs index 844c936..baaa4e4 100644 --- a/GodotEnv/src/features/godot/commands/GodotListCommand.cs +++ b/GodotEnv/src/features/godot/commands/GodotListCommand.cs @@ -43,8 +43,7 @@ private static async Task ListRemoteVersions(ILog log, IGodotRepository godotRep } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var godotRepo = ExecutionContext.Godot.GodotRepo; if (ListRemoteAvailable) { diff --git a/GodotEnv/src/features/godot/commands/GodotUseCommand.cs b/GodotEnv/src/features/godot/commands/GodotUseCommand.cs index fcd9842..ec968f5 100644 --- a/GodotEnv/src/features/godot/commands/GodotUseCommand.cs +++ b/GodotEnv/src/features/godot/commands/GodotUseCommand.cs @@ -40,11 +40,10 @@ public GodotUseCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; var godotRepo = ExecutionContext.Godot.GodotRepo; var platform = ExecutionContext.Godot.Platform; - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var output = console.Output; var version = SemanticVersion.Parse(RawVersion); diff --git a/GodotEnv/src/features/godot/commands/cache/GodotCacheClearCommand.cs b/GodotEnv/src/features/godot/commands/cache/GodotCacheClearCommand.cs index 82ebcee..242d059 100644 --- a/GodotEnv/src/features/godot/commands/cache/GodotCacheClearCommand.cs +++ b/GodotEnv/src/features/godot/commands/cache/GodotCacheClearCommand.cs @@ -22,16 +22,15 @@ public GodotCacheClearCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; var godotRepo = ExecutionContext.Godot.GodotRepo; var platform = ExecutionContext.Godot.Platform; - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); log.Print(""); log.Info("Clearing Godot installation cache..."); log.Print(""); - ExecutionContext.Godot.GodotRepo.ClearCache(); + godotRepo.ClearCache(); log.Success("Godot installation cache cleared."); log.Print(""); diff --git a/GodotEnv/src/features/godot/commands/cache/GodotCacheCommand.cs b/GodotEnv/src/features/godot/commands/cache/GodotCacheCommand.cs index 7e8bbd2..a972970 100644 --- a/GodotEnv/src/features/godot/commands/cache/GodotCacheCommand.cs +++ b/GodotEnv/src/features/godot/commands/cache/GodotCacheCommand.cs @@ -19,9 +19,7 @@ public GodotCacheCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); log.Print(""); log.Warn( diff --git a/GodotEnv/src/features/godot/commands/env/GodotEnvCommand.cs b/GodotEnv/src/features/godot/commands/env/GodotEnvCommand.cs index 5447823..e90c806 100644 --- a/GodotEnv/src/features/godot/commands/env/GodotEnvCommand.cs +++ b/GodotEnv/src/features/godot/commands/env/GodotEnvCommand.cs @@ -20,9 +20,7 @@ public GodotEnvCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); log.Print(""); log.Warn( diff --git a/GodotEnv/src/features/godot/commands/env/GodotEnvGetCommand.cs b/GodotEnv/src/features/godot/commands/env/GodotEnvGetCommand.cs index b42c113..178d035 100644 --- a/GodotEnv/src/features/godot/commands/env/GodotEnvGetCommand.cs +++ b/GodotEnv/src/features/godot/commands/env/GodotEnvGetCommand.cs @@ -19,9 +19,7 @@ public GodotEnvGetCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var godotRepo = ExecutionContext.Godot.GodotRepo; var godotEnvVar = await godotRepo.GetGodotEnvVariable(); diff --git a/GodotEnv/src/features/godot/commands/env/GodotEnvPathCommand.cs b/GodotEnv/src/features/godot/commands/env/GodotEnvPathCommand.cs index ddfab76..2bea551 100644 --- a/GodotEnv/src/features/godot/commands/env/GodotEnvPathCommand.cs +++ b/GodotEnv/src/features/godot/commands/env/GodotEnvPathCommand.cs @@ -19,9 +19,7 @@ public GodotEnvPathCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var godotRepo = ExecutionContext.Godot.GodotRepo; log.Print(godotRepo.GodotSymlinkPath); diff --git a/GodotEnv/src/features/godot/commands/env/GodotEnvSetupCommand.cs b/GodotEnv/src/features/godot/commands/env/GodotEnvSetupCommand.cs index a4850a1..780fcd0 100644 --- a/GodotEnv/src/features/godot/commands/env/GodotEnvSetupCommand.cs +++ b/GodotEnv/src/features/godot/commands/env/GodotEnvSetupCommand.cs @@ -22,11 +22,10 @@ public GodotEnvSetupCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; var godotRepo = ExecutionContext.Godot.GodotRepo; var platform = ExecutionContext.Godot.Platform; - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); await godotRepo.AddOrUpdateGodotEnvVariable(log); } } diff --git a/GodotEnv/src/features/godot/commands/env/GodotEnvTargetCommand.cs b/GodotEnv/src/features/godot/commands/env/GodotEnvTargetCommand.cs index d52fbcb..2fc2f1f 100644 --- a/GodotEnv/src/features/godot/commands/env/GodotEnvTargetCommand.cs +++ b/GodotEnv/src/features/godot/commands/env/GodotEnvTargetCommand.cs @@ -19,8 +19,7 @@ public GodotEnvTargetCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var godotRepo = ExecutionContext.Godot.GodotRepo; log.Print(godotRepo.GodotSymlinkTarget); diff --git a/GodotEnv/src/features/godot/commands/install/GodotInstallCommand.cs b/GodotEnv/src/features/godot/commands/install/GodotInstallCommand.cs index 952e5cd..2a4b8d1 100644 --- a/GodotEnv/src/features/godot/commands/install/GodotInstallCommand.cs +++ b/GodotEnv/src/features/godot/commands/install/GodotInstallCommand.cs @@ -43,11 +43,10 @@ public GodotInstallCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; var godotRepo = ExecutionContext.Godot.GodotRepo; var platform = ExecutionContext.Godot.Platform; - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var token = console.RegisterCancellationHandler(); var version = SemanticVersion.Parse(RawVersion); diff --git a/GodotEnv/src/features/godot/commands/install/GodotUninstallCommand.cs b/GodotEnv/src/features/godot/commands/install/GodotUninstallCommand.cs index 9b081b8..9962cd1 100644 --- a/GodotEnv/src/features/godot/commands/install/GodotUninstallCommand.cs +++ b/GodotEnv/src/features/godot/commands/install/GodotUninstallCommand.cs @@ -40,11 +40,10 @@ public GodotUninstallCommand(IExecutionContext context) { } public async ValueTask ExecuteAsync(IConsole console) { - var systemInfo = ExecutionContext.Godot.Platform.SystemInfo; var godotRepo = ExecutionContext.Godot.GodotRepo; var platform = ExecutionContext.Godot.Platform; - var log = ExecutionContext.CreateLog(systemInfo, console); + var log = ExecutionContext.CreateLog(console); var version = SemanticVersion.Parse(RawVersion); var isDotnetVersion = !NoDotnet; diff --git a/GodotEnv/src/features/godot/domain/GodotRepository.cs b/GodotEnv/src/features/godot/domain/GodotRepository.cs index 0e452a2..e5bef66 100644 --- a/GodotEnv/src/features/godot/domain/GodotRepository.cs +++ b/GodotEnv/src/features/godot/domain/GodotRepository.cs @@ -422,7 +422,6 @@ public async Task UpdateGodotSymlink( var godotSharpPath = GetGodotSharpPath( installation.Path, installation.Version, installation.IsDotnetVersion ); - // log.Print($" Linking GodotSharp: {GodotSharpSymlinkPath} -> {godotSharpPath}"); await FileClient.CreateSymlink( GodotSharpSymlinkPath, godotSharpPath );