Files
openidea/crates/ide-core/Cargo.toml
arookieofcandl0ng-ai 504d8592d2 fix(tools): include the Windows user PATH agents and tools are resolved on (#499)
* fix(tools): include the Windows user PATH agents and tools are resolved on

On Windows the login-shell environment is never read (it is a Unix-only path),
so a process started before the user PATH was edited — or one that simply does
not inherit it — resolves agent executables and language-server tools on the
machine PATH alone. A tool installed for the user (npm -g, \dotnet tool
install -g\, a vendor installer) is then reported as not on PATH.

Read the user's own PATH from HKCU\\Environment (expanding REG_EXPAND_SZ
entries) and append its directories after the inherited ones in both the tool
search path and the native agent lookup, so user installs resolve without
shadowing the inherited order.

Fixes #330.

* fix(tools): use div_ceil for the registry buffer size

* fix(tools): add the Windows user PATH to the process PATH at startup

Lookups alone left agents reported as not installed, and programs started from
user PATH entries could not find their own dependencies.

---------

Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
2026-10-31 10:15:04 +08:00

23 lines
631 B
TOML

[package]
name = "ide-core"
description = "Shared vocabulary of OpenIDEA: ids, text coordinates, events, errors, settings"
version.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
dunce.workspace = true
encoding_rs.workspace = true
serde.workspace = true
serde_json.workspace = true
specta.workspace = true
specta-typescript.workspace = true
thiserror.workspace = true
tokio-util.workspace = true
[dev-dependencies]
tempfile.workspace = true
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61", features = ["Win32_Globalization", "Win32_System_Registry", "Win32_Foundation"] }