diff --git a/.cheese/scripts/publish.cs b/.cheese/scripts/publish.cs index 027e51b..e494971 100644 --- a/.cheese/scripts/publish.cs +++ b/.cheese/scripts/publish.cs @@ -37,6 +37,7 @@ Directory.CreateDirectory(logsDir); var packIgnore = $"{publishDir}/.packignore".GetFullPath(); +var packIgnoreExists = File.Exists(packIgnore); var finishedThreads = 0; var executingThreadIndex = 0; @@ -116,9 +117,14 @@ { AnsiConsole.MarkupLine($"{prompt} Begin packing."); + if (packIgnoreExists) + AnsiConsole.MarkupLine($"{prompt} `.packignore` not exists, all folder will be packed."); + packTask.IsIndeterminate = false; - var ignoredDirectories = JsonSerializer.Deserialize>(File.ReadAllText(packIgnore)); + var ignoredDirectories = packIgnoreExists + ? JsonSerializer.Deserialize>(File.ReadAllText(packIgnore)) + : new List(); var folders = new DirectoryInfo(publishDir).GetDirectories().ToList();