parent
42fd401aff
commit
eb5b34f5cd
@ -1,11 +1,13 @@
|
||||
using Recyclarr.Platform;
|
||||
using Spectre.Console.Cli;
|
||||
|
||||
namespace Recyclarr.Cli.Console.Interceptors;
|
||||
|
||||
public class VersionLogInterceptor(ILogger log) : ICommandInterceptor
|
||||
public class ProgramInformationLogInterceptor(ILogger log, IAppPaths paths) : ICommandInterceptor
|
||||
{
|
||||
public void Intercept(CommandContext context, CommandSettings settings)
|
||||
{
|
||||
log.Debug("Recyclarr Version: {Version}", GitVersionInformation.InformationalVersion);
|
||||
log.Debug("App Data Dir: {AppData}", paths.AppDataDirectory);
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
using Recyclarr.Platform;
|
||||
|
||||
namespace Recyclarr.Cli.Console.Setup;
|
||||
|
||||
public class AppPathSetupTask(ILogger log, IAppPaths paths) : IGlobalSetupTask
|
||||
{
|
||||
public void OnStart()
|
||||
{
|
||||
log.Debug("App Data Dir: {AppData}", paths.AppDataDirectory);
|
||||
|
||||
// Initialize other directories used throughout the application
|
||||
// Do not initialize the repo directory here; the GitRepositoryFactory handles that later.
|
||||
paths.CacheDirectory.Create();
|
||||
paths.LogDirectory.Create();
|
||||
paths.ConfigsDirectory.Create();
|
||||
paths.IncludesDirectory.Create();
|
||||
}
|
||||
|
||||
public void OnFinish()
|
||||
{
|
||||
// No work to do for this event
|
||||
}
|
||||
}
|
Loading…
Reference in new issue