mycroforge/MycroForge.CLI/Commands/MycroForge.Generate.Venv.cs
2024-05-04 20:44:48 +02:00

23 lines
648 B
C#

using System.CommandLine;
using MycroForge.CLI.Commands.Interfaces;
namespace MycroForge.CLI.Commands;
public partial class MycroForge
{
public partial class Generate
{
public class Venv : Command, ISubCommandOf<Generate>
{
private readonly ProjectContext _context;
public Venv(ProjectContext context) : base("venv", "Generate a venv")
{
_context = context;
this.SetHandler(ExecuteAsync);
}
private async Task ExecuteAsync() => await _context.Bash("python3 -m venv .venv");
}
}
}