Skip to content

fix(ide): Put ~/.local/bin on the zsh PATH, verify Kiro CLI by its kiro-cli name - #966

Merged
ybezsonov merged 1 commit into
mainfrom
fix/ide-local-bin-path
Nov 22, 2026
Merged

ybezsonov merged 1 commit into
mainfrom
fix/ide-local-bin-path

Conversation

@ybezsonov

Copy link
Copy Markdown
Contributor

Problem

In IDE terminals (zsh), direnv, kiro-cli, claude and uv from ~/.local/bin aren't found once Code Editor restarts after the bootstrap:

/home/ec2-user/.zshrc:48: command not found: direnv
zsh: command not found: kiro-cli

install_uv meant to add ~/.local/bin to /etc/profile.d/workshop.sh, which .zshrc sources. Its guard grep -q '.local/bin' matched the existing alias code="/home/ec2-user/.local/bin/code-editor-server" line, so the export was never written.

The gap stays hidden as long as Code Editor runs from its first start: it starts while ec2-user's login shell is still bash and keeps the bash-derived PATH (.bashrc adds ~/.local/bin). After shell.sh switches the login shell to zsh, any restart of Code Editor (by a participant, or by a workshop that adds environment for it) takes zsh's PATH, which lacks ~/.local/bin.

Seen on a java-ai-agents test event on 22 Nov 2026: the extension host's PATH after a restart had /usr/lib/maven/bin, ~/bin and ~/.fzf/bin, but no ~/.local/bin.

Change

  • install_uv: the guard matches only an existing PATH export (^export PATH=.*\.local/bin).
  • install_kiro_cli: verifies ~/.local/bin/kiro-cli. The installer writes kiro-cli, not kiro, so every bootstrap logged "Kiro CLI installation could not be verified".

No generated template changes: the IDE clones main and runs tools.sh at boot.

Checks

  • On a copy of workshop.sh with the maven PATH line and the alias code= line, the old guard skipped the export. The new guard writes it once and keeps a single line over two runs.
  • bash -n infra/scripts/ide/tools.sh passes.
  • Not yet run on an IDE.

…ro-cli name

install_uv meant to add ~/.local/bin to /etc/profile.d/workshop.sh, but its guard
grep '.local/bin' matched the existing `alias code=".../.local/bin/code-editor-server"`
line, so the export was never written. zsh (.zshrc sources workshop.sh) then has no
~/.local/bin: direnv, kiro-cli, claude and uv aren't found in IDE terminals once Code
Editor is restarted after shell.sh switched the login shell to zsh. Until then the
editor still carries the bash-derived PATH from its first start, which hid the gap.

The guard now matches only an existing PATH export. install_kiro_cli checked
~/.local/bin/kiro, but the installer writes kiro-cli, so every bootstrap logged
"Kiro CLI installation could not be verified".
@ybezsonov
ybezsonov merged commit 3334563 into main Nov 22, 2026
49 checks passed
@ybezsonov
ybezsonov deleted the fix/ide-local-bin-path branch November 22, 2026 13:39
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