Skip to content

Commit

Permalink
file unable to access give sudo perms
Browse files Browse the repository at this point in the history
  • Loading branch information
abaskk-msft committed Jul 2, 2024
1 parent 6591461 commit 4b74b55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 0 additions & 7 deletions src/YamlValidator/InputProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4b74b55

Please sign in to comment.