Posted on Leave a comment

Fix Error Hook failed with error code 127

Error: Hook failed with error code 127:

Fix:

# check if the file has ^M line endings
cat -v FILE-NAME-WITH-ERROR

# fix the file
tr -d '\r' < FILE-NAME-WITH-ERROR > FILE-NAME-WITH-ERROR.fix

# check if problem fixed in resulting file from above
cat -v FILE-NAME-WITH-ERROR.fix

# overwrite original file with fixed file
mv FILE-NAME-WITH-ERROR.fix  FILE-NAME-WITH-ERROR
发表评论

电子邮件地址不会被公开。 必填项已用*标注