Skip to content

setup.sh should set AIPASS_HOME env var and add drone to PATH #313

@Input-X

Description

@Input-X

Problem

Drone only works from inside the AIPass directory tree. External projects can't access AIPass services because:

  1. No AIPASS_HOME env var — drone's registry finder already supports AIPASS_HOME as a fallback (registry_handler.py line 70-75), but setup.sh never sets it
  2. drone not on PATH — On Linux, setup.sh creates a symlink to /usr/local/bin. On Windows, it just prints instructions

Why this matters

The intended architecture: AIPass is installed once, then external projects use drone to access all AIPass services. Without AIPASS_HOME and drone on PATH, this is impossible.

Fix

setup.sh should:

All platforms

  • Set AIPASS_HOME env var pointing to the AIPass installation directory

Linux/macOS

  • Already creates /usr/local/bin/drone symlink (working)
  • Add export AIPASS_HOME=/path/to/AIPass to ~/.bashrc or ~/.profile

Windows

  • Add AIPASS_HOME as a user environment variable via setx
  • Add .venv/Scripts to user PATH via setx (or create a drone.bat wrapper in a PATH location)

Code already supports it

registry_handler.py already has the AIPASS_HOME fallback in:

  • find_registry() — falls back to AIPASS_HOME when CWD walk finds nothing
  • get_all_branches() — merges home registry with local project registry
  • get_branch_by_name() — checks home registry as fallback

The plumbing is done. Just needs setup.sh to configure it.

Found during Windows 10 setup testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions