Skip to content

Commit

Permalink
Improved folder and file check
Browse files Browse the repository at this point in the history
  • Loading branch information
bhanu-lab committed Dec 29, 2024
1 parent 21d6d0a commit c64dbd7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/validate-macsetup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ jobs:
run: |
# Read validation commands from config/tools.json and run them
macsetup_dir="$HOME/.macsetup"
tools=$(jq -c '.[]' \"$macsetup_dir/tools.json\")
if [ ! -d "$macsetup_dir" ]; then
echo "$macsetup_dir does not exist."
exit 1
fi
if [ ! -f "$macsetup_dir/tools.json" ]; then
echo "tools.json not found in $macsetup_dir"
exit 1
fi
tools=$(jq -c '.[]' "$macsetup_dir/tools.json")
for tool in $tools; do
name=$(echo "$tool" | jq -r '.name')
verify_command=$(echo "$tool" | jq -r '.verify_command')
Expand Down

0 comments on commit c64dbd7

Please sign in to comment.