update_path
This commit is contained in:
@@ -224,6 +224,14 @@ main() {
|
||||
# BSD sed (macOS)
|
||||
sed -i '' "1s|.*|#!$VENV_PATH/bin/python3|" "$INSTALL_LOCATION"
|
||||
fi
|
||||
|
||||
# Verify shebang was updated correctly
|
||||
SHEBANG=$(head -n 1 "$INSTALL_LOCATION")
|
||||
if [ "$SHEBANG" != "#!$VENV_PATH/bin/python3" ]; then
|
||||
echo_error "Failed to update shebang. Got: $SHEBANG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod +x "$INSTALL_LOCATION"
|
||||
echo_green "✓ Installed to $INSTALL_LOCATION"
|
||||
echo ""
|
||||
@@ -252,6 +260,16 @@ main() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test that finish works
|
||||
echo "Testing installation..."
|
||||
if ! "$INSTALL_LOCATION" --version > /dev/null 2>&1; then
|
||||
echo_error "finish command failed to execute"
|
||||
echo "Testing with direct python call..."
|
||||
"$VENV_PATH/bin/python3" "$INSTALL_LOCATION" --version
|
||||
exit 1
|
||||
fi
|
||||
echo_green "✓ finish command works"
|
||||
|
||||
# Run finish install to set up keybinding
|
||||
echo "Setting up shell keybinding..."
|
||||
if "$INSTALL_LOCATION" install; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/home/mike/.venvs/cli/bin/python3
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
finish.py – AI shell completions that never leave your machine.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user