From c0e327eed073ad0948d2113712ddb65aaf9af8f3 Mon Sep 17 00:00:00 2001 From: jamesshenry Date: Thu, 25 Jun 2026 16:05:28 +0100 Subject: [PATCH 1/2] use new stanza fix --- src/Directory.Packages.props | 4 ++-- src/Typical/Typical.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 0451d6e..bf08a6b 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -47,9 +47,9 @@ - + - + diff --git a/src/Typical/Typical.csproj b/src/Typical/Typical.csproj index ba2ec48..1ff2d42 100644 --- a/src/Typical/Typical.csproj +++ b/src/Typical/Typical.csproj @@ -22,7 +22,7 @@ - + From ea45fa21817b522b0491adefd514dbb49677ef4e Mon Sep 17 00:00:00 2001 From: jamesshenry Date: Thu, 25 Jun 2026 16:24:05 +0100 Subject: [PATCH 2/2] deps: update --- src/Directory.Packages.props | 32 +++++++++--------- src/Typical/Infrastructure/StartupTasks.cs | 38 +++------------------- 2 files changed, 21 insertions(+), 49 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index bf08a6b..a1941f3 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,23 +17,23 @@ - - - + + + - - - - - - + + + + + + @@ -43,17 +43,17 @@ - + - + - + - + - + diff --git a/src/Typical/Infrastructure/StartupTasks.cs b/src/Typical/Infrastructure/StartupTasks.cs index 986453b..83d07f0 100644 --- a/src/Typical/Infrastructure/StartupTasks.cs +++ b/src/Typical/Infrastructure/StartupTasks.cs @@ -1,8 +1,12 @@ using System.Text.Json; + using DotNetPathUtils; + using Microsoft.Extensions.Logging; -using NuGet.Versioning; + using Typical.Configuration; + +using Velopack; using Velopack.Locators; using Velopack.Logging; @@ -10,38 +14,6 @@ namespace Typical.Infrastructure; public static class StartupTasks { - private static JsonSerializerOptions JsonOptions { get; } = - new JsonSerializerOptions { WriteIndented = true }; - - internal static void Install(SemanticVersion? v = null) - { - var locator = VelopackLocator.CreateDefaultForPlatform(); - - var logger = locator.Log; - - var installDir = locator.RootAppDir is not null - ? Path.Combine(locator.RootAppDir, "current") - : AppDomain.CurrentDomain.BaseDirectory; - - logger.Debug($"Adding path to $env.PATH: {installDir} "); - - var result = new PathEnvironmentHelper().EnsureDirectoryIsInPath(installDir!); - - logger.Info($"Add path result: {result.Status}"); - } - - internal static void Uninstall(SemanticVersion? v = null) - { - var logger = VelopackLocator.CreateDefaultForPlatform().Log; - logger.Info("Performing installation tasks..."); - logger.Info("Cleaning up path..."); - - var appDir = Path.GetDirectoryName(AppContext.BaseDirectory)!; - var result = new PathEnvironmentHelper().RemoveDirectoryFromPath(appDir); - - logger.Info($"Remove from path result: {result.Status}"); - } - public static async Task InitializeAsync(ILogger? logger = null) { var configPath = Path.Combine(AppPaths.ConfigHome, "config.json");