Skip to content

fix(install): remove legacy sam references and deduplicate install.sh - #726

Merged
aojea merged 1 commit into
google:mainfrom
aojea:fix-install-script
Oct 15, 2026
Merged

aojea merged 1 commit into
google:mainfrom
aojea:fix-install-script

Conversation

@aojea

@aojea aojea commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator
  • Remove legacy sam_${OS_NAME}_${ARCH_NAME}.tar.gz fallback and sam-* binary names from site/static/install.sh.
  • Allow overriding INSTALL_DIR via AGENTMESH_INSTALL_DIR or INSTALL_DIR environment variables.
  • Replace top-level install.sh with a symlink to site/static/install.sh so the script is maintained in one place while Hugo continues serving a regular file at /install.sh.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request moves the installation script to site/static/install.sh, replaces the root install.sh with a symlink, removes legacy sam-* binary references, and introduces configurable installation directories. Feedback highlights that using a Git symlink for the root install.sh will break the common curl | bash installation method via GitHub raw URLs. Additionally, using the generic INSTALL_DIR environment variable poses a collision risk, and it is recommended to only support the prefixed AGENTMESH_INSTALL_DIR variable.

I am having trouble creating individual review comments. Click here to see my feedback.

install.sh (1)

high

Using a Git symlink for the top-level install.sh will break the common curl -fsSL https://raw.githubusercontent.com/.../install.sh | bash installation method. When fetching a symlink via GitHub's raw URL, GitHub returns the literal target path string (site/static/install.sh) rather than the contents of the target file. Consequently, running the curl command will attempt to execute the string site/static/install.sh as a command, resulting in a No such file or directory error on the user's machine.

Instead of a symlink, consider keeping install.sh at the root as the source of truth, and copy it to site/static/install.sh during the website build/deployment process, or use a pre-commit hook / Makefile target to keep them in sync.

site/static/install.sh (5)

medium

Using the highly generic environment variable INSTALL_DIR to override the installation directory is risky. If a user has INSTALL_DIR set in their environment for another tool or build process, this script will silently install Agent Mesh into that directory instead of /usr/local/bin.

It is safer to only support the prefixed AGENTMESH_INSTALL_DIR environment variable to avoid accidental collisions.

INSTALL_DIR="${AGENTMESH_INSTALL_DIR:-/usr/local/bin}"

@aojea
aojea merged commit 821b170 into google:main Oct 15, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant