Skip to content

Commit

Permalink
Bugfix to prevent false positives on comments
Browse files Browse the repository at this point in the history
  • Loading branch information
waynetheisinger committed Mar 1, 2015
1 parent a5eb644 commit 8843d73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modman
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,6 @@ run_automodman () #"$module" "$mm" "$wc_dir" "$wc_desc"
#echo "in base directory $amm"
#echo "in working copy $awc_dir"
#echo "modman file will be or is $awc_desc"
#does the modman file exist?
#yes
Expand Down Expand Up @@ -589,8 +588,10 @@ run_automodman () #"$module" "$mm" "$wc_dir" "$wc_desc"
#if substring then do recurse
if [[ $prevmatch -eq 0 ]]; then #make sure we have not previously matched
#alter the pathname into a regex that will not match comments
#pre-existing path: yes | no?
if grep -rq "\s$pathname$" "${amm}/"*"/modman" #target is what is important so find end line not beginning line
if grep -rq "^[^#].*\s$pathname$" "${amm}/"*"/modman" #target is what is important so find end line not beginning line
then #pre-existing path: yes
echo "..."
echo "A path was found that exists in below modman description file" #error
Expand Down

0 comments on commit 8843d73

Please sign in to comment.