mycroforge/MycroForge.CLI/Commands/MycroForge.Generate.Venv.cs

24 lines
662 B
C#

using System.CommandLine;
using MycroForge.Core;
using MycroForge.Core.Contract;
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");
}
}
}