-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Description
The problem
Hi,
I have a pre-commit hook and it works from the command line if I do
git add file1.py
git add file2.py
git commit -m "a message"
however if I run it from the desktop I get
Activating virtual environment...
.git/hooks/pre-commit: line 5: C:/Work/GitHubRepo/WatsonX/pilots/FK/orchestration/venv_fk_watsonx/Scripts/activate: No such file or directory
Failed to activate virtual environment. Commit aborted.
This is the same if Use the /c/Work path too
#!/bin/bash
echo "Activating virtual environment..."
#source /c/Work/GitHubRepo/WatsonX/pilots/FK/orchestration/venv_fk_watsonx/Scripts/activate
source C:/Work/GitHubRepo/WatsonX/pilots/FK/orchestration/venv_fk_watsonx/Scripts/activate
if [ $? -ne 0 ]; then
echo "Failed to activate virtual environment. Commit aborted."
exit 1
fi
echo "Running pybabel command as a pre-commit hook..."
pybabel init -D prompt -i locales/sv/prompt.pot -o locales/sv/LC_MESSAGES/prompt.po -l en -w 130
pybabel init -D prompt -i locales/en/prompt.pot -o locales/en/LC_MESSAGES/prompt.po -l en -w 130
if [ $? -ne 0 ]; then
echo "pybabel command failed! Commit aborted."
exit 1
fi
echo "Adding to commit"
git add locales/sv/LC_MESSAGES/prompt.po
git add locales/en/LC_MESSAGES/prompt.po
echo "pybabel command executed successfully. Proceeding with commit..."
exit 0
Release version
Version 3.4.8 (x64)
Operating system
Windows 11
Steps to reproduce the behavior
Use the pre-commit and it fails
Log files
No response
Screenshots
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.
