From 66d8d727772a71cf80d549b8abef0500489074ff Mon Sep 17 00:00:00 2001 From: Ikiru Yoshizaki <3856350+guitarrapc@users.noreply.github.com> Date: Tue, 17 Dec 2024 19:26:15 +0900 Subject: [PATCH] chore: skip --- src/Actions/Program.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Actions/Program.cs b/src/Actions/Program.cs index afe739d..928a100 100644 --- a/src/Actions/Program.cs +++ b/src/Actions/Program.cs @@ -68,9 +68,16 @@ public void UpdateVersion(string version, string path, bool dryRun) [Command("validate-file-exists")] public void ValidateFileExists(string pathPattern, bool verbose) { - _verbose = verbose; + SetOptions(verbose); + WriteLog($"Validating path, {pathPattern} ..."); WriteVerbose($"UTF8: {DebugTools.ToUtf8Base64String(pathPattern)}"); + if (string.IsNullOrWhiteSpace(pathPattern)) + { + WriteLog("Empty path detected, skip execution."); + return; + } + var command = new FileExsistsCommand(pathPattern); command.Validate(); @@ -101,6 +108,11 @@ public void CreateDummy(string basePath) _ => throw new NotImplementedException(nameof(format)), }; + private void SetOptions(bool verbose) + { + _verbose = verbose; + } + void WriteLog(string value) { Console.WriteLine($"[{DateTime.Now:s}] {value}");