简体   繁体   中英

.git/hooks/pre-commit: line 33: detekt: command not found

I am trying to use detekt on my android project but when i try to commit using sourcetree i get this error.

Checking prerequisites Collecting modified files Running detekt.git/hooks/pre-commit: line 33: detekt: command not found

print of the error on sourcetree

I suspect you have detekt installed in a location that is not in your $PATH (eg not in /usr/local/bin or /usr/bin or similar).

Try finding where detekt is installed with which detekt (or possibly other searching) and once you find where it is, put the full path to it in when calling it in the pre-commit hook.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM