Repository navigation
Commit 7be269e
python: remove implicit PATH fallback for CLI executable resolution
The runtime start path fell back to shutil.which(cli_path) whenever the
resolved cli_path did not exist as a file. This let the SDK implicitly
select an arbitrary same-named executable found on the host PATH instead
of failing when the SDK-managed runtime or an explicitly configured path
was not actually present, re-introducing the PATH-search behavior
originally added by 05dd60e that #2524 asks to remove.
Resolution order is unchanged (explicit path > COPILOT_CLI_PATH >
SDK-managed downloaded runtime, see _resolve_runtime_entrypoint); only the
undocumented PATH-search fallback at process start is removed. A missing
resolved path now raises a RuntimeError up front instead of silently
searching PATH.
Adds a regression test asserting that a same-named executable placed on
PATH is not used when the configured path does not exist.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent bba92dd commit 7be269e
2 files changed
Lines changed: 27 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
4352 | 4351 | | |
4353 | 4352 | | |
4354 | 4353 | | |
4355 | | - | |
| 4354 | + | |
| 4355 | + | |
| 4356 | + | |
| 4357 | + | |
4356 | 4358 | | |
4357 | | - | |
4358 | | - | |
4359 | | - | |
| 4359 | + | |
| 4360 | + | |
| 4361 | + | |
| 4362 | + | |
4360 | 4363 | | |
4361 | 4364 | | |
4362 | 4365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
86 | 105 | | |
87 | 106 | | |
88 | 107 | | |
| |||
0 commit comments