bash fix
This commit is contained in:
parent
8fa50d1a44
commit
53bee4db2d
3 changed files with 49 additions and 7 deletions
|
|
@ -107,10 +107,22 @@ jobs:
|
||||||
MAX_ITERATIONS: 10
|
MAX_ITERATIONS: 10
|
||||||
MAX_RETRIES: 3
|
MAX_RETRIES: 3
|
||||||
TIMEOUT_HOURS: 6
|
TIMEOUT_HOURS: 6
|
||||||
PATH: ${{ env.PATH }}:$HOME/.cursor/bin
|
PATH: /usr/bin:/bin:$HOME/.local/bin:$HOME/.cursor/bin:${{ env.PATH }}
|
||||||
run: |
|
run: |
|
||||||
# Ensure cursor-agent is in PATH for this step
|
# Ensure bash and cursor-agent are in PATH for this step
|
||||||
export PATH="$HOME/.local/bin:$HOME/.cursor/bin:$PATH"
|
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
|
# Verify cursor-agent is accessible
|
||||||
if ! command -v cursor-agent &> /dev/null; then
|
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"
|
find "$HOME" -name "cursor-agent" -type f 2>/dev/null | head -5 || echo "No cursor-agent found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "✅ cursor-agent found at: $(command -v cursor-agent)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${{ github.workspace }}
|
cd ${{ github.workspace }}
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,22 @@ jobs:
|
||||||
CURSOR_MODEL: ${{ secrets.CURSOR_MODEL }}
|
CURSOR_MODEL: ${{ secrets.CURSOR_MODEL }}
|
||||||
PROJECT_ROOT: ${{ github.workspace }}
|
PROJECT_ROOT: ${{ github.workspace }}
|
||||||
MAX_ITERATIONS: 10
|
MAX_ITERATIONS: 10
|
||||||
PATH: ${{ env.PATH }}:$HOME/.cursor/bin
|
PATH: /usr/bin:/bin:$HOME/.local/bin:$HOME/.cursor/bin:${{ env.PATH }}
|
||||||
run: |
|
run: |
|
||||||
# Ensure cursor-agent is in PATH for this step
|
# Ensure bash and cursor-agent are in PATH for this step
|
||||||
export PATH="$HOME/.local/bin:$HOME/.cursor/bin:$PATH"
|
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
|
# Verify cursor-agent is accessible
|
||||||
if ! command -v cursor-agent &> /dev/null; then
|
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"
|
find "$HOME" -name "cursor-agent" -type f 2>/dev/null | head -5 || echo "No cursor-agent found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "✅ cursor-agent found at: $(command -v cursor-agent)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${{ github.workspace }}
|
cd ${{ github.workspace }}
|
||||||
|
|
|
||||||
|
|
@ -110,10 +110,24 @@ class CursorCLI:
|
||||||
# Add task description
|
# Add task description
|
||||||
cmd.append(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 = {
|
env = {
|
||||||
"CURSOR_API_KEY": self.api_key,
|
"CURSOR_API_KEY": self.api_key,
|
||||||
"CURSOR_MODEL": self.model,
|
"CURSOR_MODEL": self.model,
|
||||||
|
"PATH": new_path,
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue