mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-16 10:33:48 +00:00
Add CheckRidsCommand to check available RIDs for the current OS
This commit is contained in:
2 files changed
+25
-1
No files matched your search
@@ -0,0 +1,21 @@
|
||||
// ReSharper disable ClassNeverInstantiated.Global
|
||||
// ReSharper disable UnusedType.Global
|
||||
// ReSharper disable UnusedMember.Global
|
||||
namespace Build.Commands;
|
||||
|
||||
public sealed class CheckRidsCommand
|
||||
{
|
||||
[Command("check-rids", Description = "Check the RIDs for the current OS")]
|
||||
public void GetRids()
|
||||
{
|
||||
if(!Environment.IsWorkingDirectoryValid())
|
||||
return;
|
||||
|
||||
var rids = Environment.GetRidsForCurrentOS();
|
||||
Console.WriteLine("The following RIDs are available for the current OS:");
|
||||
foreach (var rid in rids)
|
||||
{
|
||||
Console.WriteLine($"- {rid}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
var builder = CoconaApp.CreateBuilder();
|
||||
using Build.Commands;
|
||||
|
||||
var builder = CoconaApp.CreateBuilder();
|
||||
var app = builder.Build();
|
||||
app.AddCommands<CheckRidsCommand>();
|
||||
app.Run();
|
||||
Reference in new issue
Block a user