mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 22:07:21 +00:00
32 lines
928 B
C#
32 lines
928 B
C#
namespace Build.Commands;
|
|
|
|
public sealed class CheckRidsCommand
|
|
{
|
|
/// <summary>
|
|
/// Defines the command "check-rids".
|
|
/// </summary>
|
|
public static Command CreateCommand()
|
|
{
|
|
var command = new Command("check-rids", "Check the RIDs for the current OS");
|
|
command.SetAction(_ => new CheckRidsCommand().GetRids());
|
|
return command;
|
|
}
|
|
|
|
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}");
|
|
}
|
|
|
|
Console.WriteLine();
|
|
Console.WriteLine("The RID for the current OS and CPU is:");
|
|
var currentRid = Environment.GetCurrentRid();
|
|
Console.WriteLine($"- {currentRid}");
|
|
}
|
|
} |