Skip to content

Commit cb55b88

Browse files
committed
chore: 加个提醒
1 parent 302f914 commit cb55b88

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

MaiChartManager.CLI/Commands/MakeAbCommand.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.ComponentModel;
22
using System.Text.RegularExpressions;
3+
using MaiChartManager;
34
using MaiChartManager.CLI.Utils;
45
using MaiChartManager.Utils;
56
using Spectre.Console;
@@ -32,6 +33,11 @@ public override ValidationResult Validate()
3233

3334
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
3435
{
36+
if (string.IsNullOrEmpty(StaticSettings.GamePath) || !Directory.Exists(StaticSettings.StreamingAssets))
37+
{
38+
AnsiConsole.MarkupLine("[red]✗ 未找到游戏目录,请先通过桌面版配置游戏路径[/]");
39+
return 1;
40+
}
3541
var candidates = Directory.EnumerateFiles(settings.Folder)
3642
.Select(path => (Path: path, Name: Path.GetFileName(path)))
3743
.Select(x =>

0 commit comments

Comments
 (0)