mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-24 23:51:48 +00:00
Plugins: fix env-aware root resolution and caching (#44046)
Merged via squash.
Prepared head SHA: 6e8852a188
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
committed by
GitHub
parent
688e3f0863
commit
e6897c800b
@@ -153,4 +153,21 @@ describe("resolvePluginTools optional tools", () => {
|
||||
expect(tools.map((tool) => tool.name)).toEqual(["other_tool"]);
|
||||
expect(registry.diagnostics).toHaveLength(0);
|
||||
});
|
||||
|
||||
it("forwards an explicit env to plugin loading", () => {
|
||||
setOptionalDemoRegistry();
|
||||
const env = { OPENCLAW_HOME: "/srv/openclaw-home" } as NodeJS.ProcessEnv;
|
||||
|
||||
resolvePluginTools({
|
||||
context: createContext() as never,
|
||||
env,
|
||||
toolAllowlist: ["optional_tool"],
|
||||
});
|
||||
|
||||
expect(loadOpenClawPluginsMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
env,
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user