Skip to content

Commit

Permalink
Prevent false positives when checking for changes in src/doc.
Browse files Browse the repository at this point in the history
When changing cargo versions from stable to nightly, it's possible
that the Cargo.lock format changes ever so slightly. This leaves
the `Cargo.lock` file changed which is picked up by `git status`.

This patch adjusts the `git status` invocation to limit itself
to the CWD.
  • Loading branch information
Byron committed Apr 18, 2023
1 parent 11d8962 commit 85dc569
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ci/validate-man.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e

cd src/doc

changes=$(git status --porcelain)
changes=$(git status --porcelain -- .)
if [ -n "$changes" ]
then
echo "git directory must be clean before running this script."
Expand All @@ -14,10 +14,10 @@ fi

./build-man.sh

changes=$(git status --porcelain)
changes=$(git status --porcelain -- .)
if [ -n "$changes" ]
then
echo "Detected changes in man pages:"
echo "Detected changes of man pages in src/doc:"
echo "$changes"
echo
echo "Please run './build-man.sh' in the src/doc directory to rebuild the"
Expand Down

0 comments on commit 85dc569

Please sign in to comment.