Skip to content

Commit

Permalink
Make adr files recognition stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
davebaol authored and halostatue committed Jul 19, 2024
1 parent 43aae6b commit 3e87ffe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/adr-list
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ adr_dir="$("$adr_bin_dir/_adr_dir")"

if [ -d "$adr_dir" ]
then
find "$adr_dir" | grep -E "^$adr_dir/[0-9]+-[^/]*\\.md" | sort
find "$adr_dir" -maxdepth 1 -type f | grep -E "^.{${#adr_dir}}/[0-9]*[1-9][0-9]*-[^/]*\\.md$" | sort
else
echo "The $adr_dir directory does not exist"
exit 1
fi

0 comments on commit 3e87ffe

Please sign in to comment.