Skip to content

Commit

Permalink
Instead of raising an error, cd to the git repo root.
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi committed Dec 25, 2018
1 parent ca5fac8 commit 71b189b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scripts/copyright_line_check.sh
Expand Up @@ -7,13 +7,8 @@ set -euo pipefail
# Enable recursive globbing, and make globs that do not match return null values.
shopt -s globstar nullglob

# Make sure the current working directory is the root directory.
if [ ! -f "./requirements.txt" ] || [ ! -f "./CHANGELOG.md" ]; then
echo -e 'Please run this script from the root directory of the repo:\n'
echo -e ' ./scripts/copyright_line_check.sh\n'
echo -e "The current working directory is: $(pwd)\n"
exit 1
fi
# Make sure the current working directory for this script is the root directory.
pushd "$(git rev-parse --show-toplevel)" > /dev/null

ensure_file_has_copyright_line() {
filename="$1"
Expand Down

0 comments on commit 71b189b

Please sign in to comment.