cursor installation path
This commit is contained in:
parent
9e13a50e07
commit
984d585abe
3 changed files with 59 additions and 23 deletions
|
|
@ -49,16 +49,28 @@ jobs:
|
||||||
- name: Install Cursor CLI
|
- name: Install Cursor CLI
|
||||||
run: |
|
run: |
|
||||||
curl https://cursor.com/install -fsS | bash
|
curl https://cursor.com/install -fsS | bash
|
||||||
export PATH="$HOME/.cursor/bin:$PATH"
|
# Cursor installs to ~/.local/bin by default
|
||||||
echo "$HOME/.cursor/bin" >> $GITHUB_PATH
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
|
# Also check ~/.cursor/bin (older location)
|
||||||
|
if [ -d "$HOME/.cursor/bin" ]; then
|
||||||
|
export PATH="$HOME/.cursor/bin:$PATH"
|
||||||
|
echo "$HOME/.cursor/bin" >> $GITHUB_PATH
|
||||||
|
fi
|
||||||
# Verify installation
|
# Verify installation
|
||||||
if [ -f "$HOME/.cursor/bin/cursor-agent" ]; then
|
if [ -f "$HOME/.local/bin/cursor-agent" ]; then
|
||||||
|
echo "✅ Cursor CLI installed at $HOME/.local/bin/cursor-agent"
|
||||||
|
chmod +x "$HOME/.local/bin/cursor-agent"
|
||||||
|
"$HOME/.local/bin/cursor-agent" --version || echo "cursor-agent executable found but version check failed"
|
||||||
|
elif [ -f "$HOME/.cursor/bin/cursor-agent" ]; then
|
||||||
echo "✅ Cursor CLI installed at $HOME/.cursor/bin/cursor-agent"
|
echo "✅ Cursor CLI installed at $HOME/.cursor/bin/cursor-agent"
|
||||||
chmod +x "$HOME/.cursor/bin/cursor-agent"
|
chmod +x "$HOME/.cursor/bin/cursor-agent"
|
||||||
"$HOME/.cursor/bin/cursor-agent" --version || echo "cursor-agent executable found but version check failed"
|
"$HOME/.cursor/bin/cursor-agent" --version || echo "cursor-agent executable found but version check failed"
|
||||||
else
|
else
|
||||||
echo "❌ Cursor CLI not found at $HOME/.cursor/bin/cursor-agent"
|
echo "❌ Cursor CLI not found in expected locations"
|
||||||
ls -la $HOME/.cursor/bin/ || echo "Directory $HOME/.cursor/bin/ does not exist"
|
echo "Checking PATH..."
|
||||||
|
command -v cursor-agent || echo "cursor-agent not in PATH"
|
||||||
|
find "$HOME" -name "cursor-agent" -type f 2>/dev/null | head -5 || echo "No cursor-agent found in $HOME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -96,17 +108,22 @@ jobs:
|
||||||
PATH: ${{ env.PATH }}:$HOME/.cursor/bin
|
PATH: ${{ env.PATH }}:$HOME/.cursor/bin
|
||||||
run: |
|
run: |
|
||||||
# Ensure cursor-agent is in PATH for this step
|
# Ensure cursor-agent is in PATH for this step
|
||||||
export PATH="$HOME/.cursor/bin:$PATH"
|
export PATH="$HOME/.local/bin:$HOME/.cursor/bin:$PATH"
|
||||||
|
|
||||||
# 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
|
||||||
echo "❌ cursor-agent not found in PATH"
|
echo "❌ cursor-agent not found in PATH"
|
||||||
echo "PATH: $PATH"
|
echo "PATH: $PATH"
|
||||||
echo "Trying full path..."
|
echo "Trying full paths..."
|
||||||
if [ -f "$HOME/.cursor/bin/cursor-agent" ]; then
|
if [ -f "$HOME/.local/bin/cursor-agent" ]; then
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
echo "✅ Found at $HOME/.local/bin/cursor-agent"
|
||||||
|
elif [ -f "$HOME/.cursor/bin/cursor-agent" ]; then
|
||||||
export PATH="$HOME/.cursor/bin:$PATH"
|
export PATH="$HOME/.cursor/bin:$PATH"
|
||||||
|
echo "✅ Found at $HOME/.cursor/bin/cursor-agent"
|
||||||
else
|
else
|
||||||
echo "❌ cursor-agent not found at $HOME/.cursor/bin/cursor-agent"
|
echo "❌ cursor-agent not found in any expected location"
|
||||||
|
find "$HOME" -name "cursor-agent" -type f 2>/dev/null | head -5 || echo "No cursor-agent found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -33,16 +33,28 @@ jobs:
|
||||||
- name: Install Cursor CLI
|
- name: Install Cursor CLI
|
||||||
run: |
|
run: |
|
||||||
curl https://cursor.com/install -fsS | bash
|
curl https://cursor.com/install -fsS | bash
|
||||||
export PATH="$HOME/.cursor/bin:$PATH"
|
# Cursor installs to ~/.local/bin by default
|
||||||
echo "$HOME/.cursor/bin" >> $GITHUB_PATH
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
|
# Also check ~/.cursor/bin (older location)
|
||||||
|
if [ -d "$HOME/.cursor/bin" ]; then
|
||||||
|
export PATH="$HOME/.cursor/bin:$PATH"
|
||||||
|
echo "$HOME/.cursor/bin" >> $GITHUB_PATH
|
||||||
|
fi
|
||||||
# Verify installation
|
# Verify installation
|
||||||
if [ -f "$HOME/.cursor/bin/cursor-agent" ]; then
|
if [ -f "$HOME/.local/bin/cursor-agent" ]; then
|
||||||
|
echo "✅ Cursor CLI installed at $HOME/.local/bin/cursor-agent"
|
||||||
|
chmod +x "$HOME/.local/bin/cursor-agent"
|
||||||
|
"$HOME/.local/bin/cursor-agent" --version || echo "cursor-agent executable found but version check failed"
|
||||||
|
elif [ -f "$HOME/.cursor/bin/cursor-agent" ]; then
|
||||||
echo "✅ Cursor CLI installed at $HOME/.cursor/bin/cursor-agent"
|
echo "✅ Cursor CLI installed at $HOME/.cursor/bin/cursor-agent"
|
||||||
chmod +x "$HOME/.cursor/bin/cursor-agent"
|
chmod +x "$HOME/.cursor/bin/cursor-agent"
|
||||||
"$HOME/.cursor/bin/cursor-agent" --version || echo "cursor-agent executable found but version check failed"
|
"$HOME/.cursor/bin/cursor-agent" --version || echo "cursor-agent executable found but version check failed"
|
||||||
else
|
else
|
||||||
echo "❌ Cursor CLI not found at $HOME/.cursor/bin/cursor-agent"
|
echo "❌ Cursor CLI not found in expected locations"
|
||||||
ls -la $HOME/.cursor/bin/ || echo "Directory $HOME/.cursor/bin/ does not exist"
|
echo "Checking PATH..."
|
||||||
|
command -v cursor-agent || echo "cursor-agent not in PATH"
|
||||||
|
find "$HOME" -name "cursor-agent" -type f 2>/dev/null | head -5 || echo "No cursor-agent found in $HOME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -60,18 +72,22 @@ jobs:
|
||||||
PATH: ${{ env.PATH }}:$HOME/.cursor/bin
|
PATH: ${{ env.PATH }}:$HOME/.cursor/bin
|
||||||
run: |
|
run: |
|
||||||
# Ensure cursor-agent is in PATH for this step
|
# Ensure cursor-agent is in PATH for this step
|
||||||
export PATH="$HOME/.cursor/bin:$PATH"
|
export PATH="$HOME/.local/bin:$HOME/.cursor/bin:$PATH"
|
||||||
|
|
||||||
# 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
|
||||||
echo "❌ cursor-agent not found in PATH"
|
echo "❌ cursor-agent not found in PATH"
|
||||||
echo "PATH: $PATH"
|
echo "PATH: $PATH"
|
||||||
echo "Trying full path..."
|
echo "Trying full paths..."
|
||||||
if [ -f "$HOME/.cursor/bin/cursor-agent" ]; then
|
if [ -f "$HOME/.local/bin/cursor-agent" ]; then
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
echo "✅ Found at $HOME/.local/bin/cursor-agent"
|
||||||
|
elif [ -f "$HOME/.cursor/bin/cursor-agent" ]; then
|
||||||
export PATH="$HOME/.cursor/bin:$PATH"
|
export PATH="$HOME/.cursor/bin:$PATH"
|
||||||
alias cursor-agent="$HOME/.cursor/bin/cursor-agent"
|
echo "✅ Found at $HOME/.cursor/bin/cursor-agent"
|
||||||
else
|
else
|
||||||
echo "❌ cursor-agent not found at $HOME/.cursor/bin/cursor-agent"
|
echo "❌ cursor-agent not found in any expected location"
|
||||||
|
find "$HOME" -name "cursor-agent" -type f 2>/dev/null | head -5 || echo "No cursor-agent found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -54,13 +54,13 @@ class CursorCLI:
|
||||||
if cursor_agent:
|
if cursor_agent:
|
||||||
return cursor_agent
|
return cursor_agent
|
||||||
|
|
||||||
# Try common installation locations
|
# Try common installation locations (new default location first)
|
||||||
home = os.path.expanduser("~")
|
home = os.path.expanduser("~")
|
||||||
possible_paths = [
|
possible_paths = [
|
||||||
os.path.join(home, ".cursor", "bin", "cursor-agent"),
|
os.path.join(home, ".local", "bin", "cursor-agent"), # New default location
|
||||||
|
os.path.join(home, ".cursor", "bin", "cursor-agent"), # Old location
|
||||||
"/usr/local/bin/cursor-agent",
|
"/usr/local/bin/cursor-agent",
|
||||||
"/usr/bin/cursor-agent",
|
"/usr/bin/cursor-agent",
|
||||||
os.path.join(home, ".local", "bin", "cursor-agent"),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
for path in possible_paths:
|
for path in possible_paths:
|
||||||
|
|
@ -74,6 +74,7 @@ class CursorCLI:
|
||||||
print("⚠️ cursor-agent not found in PATH or common locations")
|
print("⚠️ cursor-agent not found in PATH or common locations")
|
||||||
print(f" PATH: {os.environ.get('PATH', 'not set')}")
|
print(f" PATH: {os.environ.get('PATH', 'not set')}")
|
||||||
print(f" Home: {home}")
|
print(f" Home: {home}")
|
||||||
|
print(f" Checked locations: {possible_paths}")
|
||||||
print(" Trying 'cursor-agent' anyway...")
|
print(" Trying 'cursor-agent' anyway...")
|
||||||
|
|
||||||
return "cursor-agent"
|
return "cursor-agent"
|
||||||
|
|
@ -129,7 +130,9 @@ class CursorCLI:
|
||||||
f"❌ cursor-agent not found!\n"
|
f"❌ cursor-agent not found!\n"
|
||||||
f" Please ensure Cursor CLI is installed.\n"
|
f" Please ensure Cursor CLI is installed.\n"
|
||||||
f" Installation: curl https://cursor.com/install -fsS | bash\n"
|
f" Installation: curl https://cursor.com/install -fsS | bash\n"
|
||||||
f" Expected location: $HOME/.cursor/bin/cursor-agent\n"
|
f" Expected locations:\n"
|
||||||
|
f" - $HOME/.local/bin/cursor-agent (new default)\n"
|
||||||
|
f" - $HOME/.cursor/bin/cursor-agent (old location)\n"
|
||||||
f" Current PATH: {os.environ.get('PATH', 'not set')}\n"
|
f" Current PATH: {os.environ.get('PATH', 'not set')}\n"
|
||||||
f" Current HOME: {os.environ.get('HOME', 'not set')}"
|
f" Current HOME: {os.environ.get('HOME', 'not set')}"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue