Open source AI coding agent. Designed for large projects and real world tasks.
Go aiai-agentsai-developer-toolsai-toolsclicommand-linedeveloper-toolsgitgolanggpt-4llmopenaipolyglot-programmingterminalterminal-basedterminal-ui
Install script: use sudo on mac if moving the binary to /usr/local/bin fails, fixes #21
Dane Schneidere40340fedd22
diff --git a/app/cli/install.sh b/app/cli/install.shindex 1bce5d76..c2424a05 100644--- a/app/cli/install.sh+++ b/app/cli/install.sh@@ -82,8 +82,24 @@ download_plandex () {if [ "$PLATFORM" == "darwin" ] || $IS_DOCKER ; thenif [[ -d /usr/local/bin ]]; then- mv plandex /usr/local/bin/- echo "Plandex is installed in /usr/local/bin"+ if ! mv plandex /usr/local/bin/ 2>/dev/null; then+ echo "Permission denied when attempting to move Plandex to /usr/local/bin."+ if hash sudo 2>/dev/null; then+ echo "Attempting to use sudo to complete installation."+ sudo mv plandex /usr/local/bin/+ if [[ $? -eq 0 ]]; then+ echo "Plandex is installed in /usr/local/bin."+ else+ echo "Failed to install Plandex using sudo. Please manually move Plandex to a directory in your PATH."+ exit 1+ fi+ else+ echo "sudo not found. Please manually move Plandex to a directory in your PATH."+ exit 1+ fi+ else+ echo "Plandex is installed in /usr/local/bin."+ fielseecho >&2 'Error: /usr/local/bin does not exist. Create this directory with appropriate permissions, then re-install.'cleanup