This commit is contained in:
Dmitry 2025-11-21 01:22:34 +03:00
parent 8fa50d1a44
commit 53bee4db2d
3 changed files with 49 additions and 7 deletions

View file

@ -107,10 +107,22 @@ jobs:
MAX_ITERATIONS: 10
MAX_RETRIES: 3
TIMEOUT_HOURS: 6
PATH: ${{ env.PATH }}:$HOME/.cursor/bin
PATH: /usr/bin:/bin:$HOME/.local/bin:$HOME/.cursor/bin:${{ env.PATH }}
run: |
# Ensure cursor-agent is in PATH for this step
export PATH="$HOME/.local/bin:$HOME/.cursor/bin:$PATH"
# Ensure bash and cursor-agent are in PATH for this step
export PATH="/usr/bin:/bin:$HOME/.local/bin:$HOME/.cursor/bin:$PATH"
# Verify bash is accessible
if ! command -v bash &> /dev/null; then
echo "❌ bash not found in PATH"
echo "PATH: $PATH"
echo "Looking for bash..."
find /usr /bin -name "bash" -type f 2>/dev/null | head -5 || echo "No bash found"
exit 1
else
echo "✅ bash found at: $(command -v bash)"
bash --version || echo "bash version check failed"
fi
# Verify cursor-agent is accessible
if ! command -v cursor-agent &> /dev/null; then
@ -128,6 +140,8 @@ jobs:
find "$HOME" -name "cursor-agent" -type f 2>/dev/null | head -5 || echo "No cursor-agent found"
exit 1
fi
else
echo "✅ cursor-agent found at: $(command -v cursor-agent)"
fi
cd ${{ github.workspace }}

View file

@ -71,10 +71,22 @@ jobs:
CURSOR_MODEL: ${{ secrets.CURSOR_MODEL }}
PROJECT_ROOT: ${{ github.workspace }}
MAX_ITERATIONS: 10
PATH: ${{ env.PATH }}:$HOME/.cursor/bin
PATH: /usr/bin:/bin:$HOME/.local/bin:$HOME/.cursor/bin:${{ env.PATH }}
run: |
# Ensure cursor-agent is in PATH for this step
export PATH="$HOME/.local/bin:$HOME/.cursor/bin:$PATH"
# Ensure bash and cursor-agent are in PATH for this step
export PATH="/usr/bin:/bin:$HOME/.local/bin:$HOME/.cursor/bin:$PATH"
# Verify bash is accessible
if ! command -v bash &> /dev/null; then
echo "❌ bash not found in PATH"
echo "PATH: $PATH"
echo "Looking for bash..."
find /usr /bin -name "bash" -type f 2>/dev/null | head -5 || echo "No bash found"
exit 1
else
echo "✅ bash found at: $(command -v bash)"
bash --version || echo "bash version check failed"
fi
# Verify cursor-agent is accessible
if ! command -v cursor-agent &> /dev/null; then
@ -92,6 +104,8 @@ jobs:
find "$HOME" -name "cursor-agent" -type f 2>/dev/null | head -5 || echo "No cursor-agent found"
exit 1
fi
else
echo "✅ cursor-agent found at: $(command -v cursor-agent)"
fi
cd ${{ github.workspace }}

View file

@ -110,10 +110,24 @@ class CursorCLI:
# Add task description
cmd.append(task_description)
# Set environment
# Set environment with PATH including bash location
current_path = os.environ.get("PATH", "")
# Ensure common bash locations are in PATH
bash_paths = [
"/usr/bin",
"/bin",
os.path.expanduser("~/.local/bin"),
os.path.expanduser("~/.cursor/bin"),
]
# Add bash paths if they exist
additional_paths = ":".join([p for p in bash_paths if os.path.exists(p)])
new_path = ":".join([additional_paths, current_path]) if additional_paths else current_path
env = {
"CURSOR_API_KEY": self.api_key,
"CURSOR_MODEL": self.model,
"PATH": new_path,
}
if self.verbose: