Cleaned up project and added constraints for SQLAlchemy types in generate entity
This commit is contained in:
12
MycroForge.CLI/Commands/Attributes/RequiresVenvAttribute.cs
Normal file
12
MycroForge.CLI/Commands/Attributes/RequiresVenvAttribute.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace MycroForge.CLI.Commands.Attributes;
|
||||
|
||||
public class RequiresVenvAttribute : Attribute
|
||||
{
|
||||
public string Path => System.IO.Path.Join(Environment.CurrentDirectory, ".venv");
|
||||
|
||||
public void RequireVenv(string command)
|
||||
{
|
||||
if (!File.Exists(System.IO.Path.Join(Environment.CurrentDirectory, Path)))
|
||||
throw new($"Command '{command}' requires directory {Path}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user