Skip to content

Commit

Permalink
makepkg: lint_package: Warn on package files referencing absolute Win…
Browse files Browse the repository at this point in the history
…dows paths
  • Loading branch information
lazka committed Mar 2, 2023
1 parent 3077636 commit 29014bd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/libmakepkg/lint_package/build_references.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,13 @@ warn_build_references() {
printf '%s\n' "${refs[@]#"$pkgdir/"}" >&2
fi
done

# Check for Windows-style MSYS2 root path
if find "${pkgdir}" -type f -print0 | xargs -0 grep -iFqI "$(cygpath -m /)" ; then
warning "$(gettext "Package contains reference to %s")" "\$(cygpath -m /)"
fi
if find "${pkgdir}" -type f -print0 | xargs -0 grep -iFqI "$(cygpath -w /)" ; then
warning "$(gettext "Package contains reference to %s")" "\$(cygpath -w /)"
fi
return 0
}

0 comments on commit 29014bd

Please sign in to comment.