-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCreateLocalNugetFolderModule.cs
More file actions
25 lines (21 loc) · 927 Bytes
/
Copy pathCreateLocalNugetFolderModule.cs
File metadata and controls
25 lines (21 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using Microsoft.Extensions.Logging;
using ModularPipelines.Attributes;
using ModularPipelines.Context;
using ModularPipelines.FileSystem;
using ModularPipelines.Modules;
namespace EnumerableAsyncProcessor.Pipeline.Modules.LocalMachine;
[DependsOn<RunUnitTestsModule>]
[DependsOn<PackagePathsParserModule>]
public class CreateLocalNugetFolderModule : Module<Folder>
{
protected override Task<Folder?> ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
{
var localNugetRepositoryFolder = context.Files
.GetFolder(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData))
.GetFolder("ModularPipelines")
.GetFolder("LocalNuget")
.Create();
context.Logger.LogInformation("Local NuGet Repository Path: {Path}", localNugetRepositoryFolder.Path);
return Task.FromResult<Folder?>(localNugetRepositoryFolder);
}
}