Commit efef68f
authored
Use login shell to start
On macOS, when using the sidecar experience, `aish` cannot start local MCP servers and the `Azure` agent cannot get the access token from Az CLI.
This is due to the PATH environment variable not properly setup when iTerm2 starts `"aish --Channel ..."` in the new pane. iTerm2 uses `exec` to run the `aish` command, which directly execute the program without setting up the environment variables properly.
Because of that, the `az` and `pwsh` commands cannot be found when retrieving access token, and the MCP server commands cannot be found too, which caused local MCP servers to always fail to start.
The fix is to wrap it with `zsh` by `/bin/zsh -l -c "<aish-path> --channel <channel-string>"`. In this way, `zsh` will set up the environment properly, which will then be inherited by `aish`.aish in sidecar pane to inherit proper PATH (#403)1 parent a1125f6 commit efef68f
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
0 commit comments