diff options
| Commit | 57b1b655638886cfa95832db2d0a6e3b2dc2634e (patch) | |
|---|---|---|
| Author | 2022-07-04 16:54:05 +0300 | |
| Committer | 2022-07-04 16:54:05 +0300 | |
| Files | 792f8f34ea8ac41b8dae93e1ac5ec4d182ab4c53 | |
| syndamia.com-57b1b655638886cfa95832db2d0a6e3b2dc2634e.tar syndamia.com-57b1b655638886cfa95832db2d0a6e3b2dc2634e.tar.gz syndamia.com-57b1b655638886cfa95832db2d0a6e3b2dc2634e.zip | ||
| Parent | 2e996cca84978995f83611e5f0f81c5f45f60ab7 (diff) | |
pre-commit script will now not run if called in a folder with index.md file
1 files changed, 5 insertions, 0 deletions
| -rwxr-xr-x | .hooks/pre-commit.sh | 5 |
diff --git a/.hooks/pre-commit.sh b/.hooks/pre-commit.sh index ee2143e..235a1f2 100755 --- a/.hooks/pre-commit.sh +++ b/.hooks/pre-commit.sh @@ -2,6 +2,11 @@ # When copying/symlinking to .git/hooks/ remember to remove the filename extension! +if [ -e "index.md" ]; then + echo "Refusing to run in a folder that contains an index.md file, since it will be deleted. Are you sure you are running this script from the parent directory of the directory, inside root variable?" + exit +fi + root='./src/' names=('about' 'archives' 'blog' 'docs' 'tutorials' 'reposts') |