Skip to content

Commit e3406d8

Browse files
authored
Fix prepare when using as git repository dependency (#19)
1 parent 146e679 commit e3406d8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"!/contracts/mocks/**/*"
1010
],
1111
"scripts": {
12-
"prepare": "git config --local core.hooksPath .githooks",
12+
"prepare": "scripts/prepare.sh",
1313
"compile": "hardhat compile",
1414
"lint": "npm run lint:js && npm run lint:sol",
1515
"lint:fix": "npm run lint:js:fix && npm run lint:sol:fix",

scripts/prepare.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
if git status &>/dev/null; then git config core.hooksPath .githooks; fi

0 commit comments

Comments
 (0)