Skip to content

Commit bd647f7

Browse files
committed
Edge case: no artifact
1 parent 5aafa7d commit bd647f7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Uploader/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ static async Task Main(string host, string name, string password, bool createSna
2929
};
3030

3131
var artifactDirectory = new DirectoryInfo(Path.Join(Directory.GetCurrentDirectory(), "artifacts"));
32+
if (!artifactDirectory.Exists)
33+
{
34+
Log.Warning("未找到 artifact 文件夹。可能是所有版本都没有触发打包。");
35+
return;
36+
}
37+
3238
var packs = artifactDirectory
3339
.EnumerateFiles("Minecraft-Mod-Language-Modpack-*.zip", SearchOption.AllDirectories)
3440
.Select(_ =>

0 commit comments

Comments
 (0)