diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 30eead58..7379ba07 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -51,13 +51,13 @@ jobs: - name: Test - Persistence Test Yaml Files (ubuntu & macos) run: | - resultApp=$(dotnet bin/Debug/YamlValidator/YamlValidator.dll validate --path "bin/Debug/Persistence.Tests/_TestData/AppsWithYaml") + resultApp=$(sudo dotnet bin/Debug/YamlValidator/YamlValidator.dll validate --path "bin/Debug/Persistence.Tests/_TestData/AppsWithYaml") echo "$resultApp" if [ "$resultApp" == *"Validation Failed"* ]; then echo "Invalid Yaml Files found in AppsWithYaml" exit 1 fi - resultFiles=$(dotnet bin/Debug/YamlValidator/YamlValidator.dll validate --path "bin/Debug/Persistence.Tests/_TestData/ValidYaml-CI") + resultFiles=$(sudo dotnet bin/Debug/YamlValidator/YamlValidator.dll validate --path "bin/Debug/Persistence.Tests/_TestData/ValidYaml-CI") echo "$resultFiles" if [ "$resultFiles" == *"Validation Failed"* ]; then echo "Invalid Yaml Files found in ValidYaml-CI" diff --git a/src/YamlValidator/InputProcessor.cs b/src/YamlValidator/InputProcessor.cs index a8b3fd7a..2045643f 100644 --- a/src/YamlValidator/InputProcessor.cs +++ b/src/YamlValidator/InputProcessor.cs @@ -43,13 +43,6 @@ public static RootCommand GetRootCommand() { result.ErrorMessage = $"The path '{inputFilePath}' does not exist"; } - else if (Directory.Exists(inputFilePath)) - { - if (Directory.GetFiles(inputFilePath, $"*{Constants.YamlFileExtension}").Length == 0) - { - result.ErrorMessage = $"The folder '{inputFilePath}' does not contain any yaml files"; - } - } else if (File.Exists(inputFilePath)) { if (!inputFilePath.EndsWith(Constants.YamlFileExtension, StringComparison.OrdinalIgnoreCase))