langflow
langflow copied to clipboard
make init is failing as githooks dir war removed on 0.6.9 release
[Describe the bug
make init
command is failing with error message
Browser and Version
- Version 0.6.16
To Reproduce
- open a terminal on the repo's root directory
- run
make init
Screenshots
Additional context It it failing for a missing file which was removed under the following commit https://github.com/langflow-ai/langflow/commit/4bec4dee4b0de4db78972c763b542647497fe9f3#diff-87320095d7c4f39eed5d8f3866b512eb910e4eec8e7926faaeef6a53ab786fcb
@mehadi82 Did you find any solutions?
@mehadi82 Did you find any solutions?
Yes. I will create a PR for this tonight EST time
Hi, @M-H-Mukit did you submit any pull request?
Hi @pseudo-usama
I apologize for missing my commitment. I forgot and was occupied with other priorities. I'm not sure if you still need it, but for reference, I'm sharing the code here.
#!/bin/sh
added_files=$(git diff --name-only --cached --diff-filter=d)
# Sort the imports
git diff --name-only --cached | grep '\.py$' | xargs -r poetry run ruff check --select I --fix
# Run the formatter
make format
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "make format command failed with exit code $exit_code"
exit $exit_code
fi
git add ${added_files}
Add the above code in the following file
And here is the PR https://github.com/langflow-ai/langflow/pull/2051
Hi @pseudo-usama
I have just discovered that there is a better approach introduced in the repo and here is the yaml to handle the pre-commit https://github.com/langflow-ai/langflow/blob/dev/.pre-commit-config.yaml
If you have the latest code from the dev branch, I think you no longer face the issue on running make init