We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8a60499 + ce5e9ba commit 7e4f49eCopy full SHA for 7e4f49e
1 file changed
add_missing_readme.sh
@@ -2,13 +2,13 @@
2
3
# adapted from https://github.com/r-lib/usethis/blob/master/inst/templates/readme-rmd-pre-commit.sh
4
# only run if no readme means nothing to check
5
-if [[ -f "README.md" ]]; then
6
- echo "$@"
7
- pwd
8
- exit 0
9
-else
10
11
12
- echo 'lol no readme'
13
- exit 1
14
-fi
+
+for i; do
+ echo "Looking for README.md in $(dirname $i)"
+ if [[ -f "$(dirname $i)/README.md" ]]; then
+ echo "README.md found at $(dirname $i)/README.md"
+ else
+ echo "No README.md found in $(dirname $i)"
+ exit 1
+ fi
+done
0 commit comments