mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 08:10:43 +00:00
fix(update): preserve pnpm custom global root (#78393)
Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com>
This commit is contained in:
@@ -52,6 +52,7 @@ import {
|
||||
globalInstallArgs,
|
||||
resolveGlobalInstallTarget,
|
||||
resolveGlobalInstallSpec,
|
||||
resolvePnpmGlobalDirFromGlobalRoot,
|
||||
} from "../../infra/update-global.js";
|
||||
import { runGatewayUpdate, type UpdateRunResult } from "../../infra/update-runner.js";
|
||||
import { normalizePluginsConfig, resolveEffectiveEnableState } from "../../plugins/config-state.js";
|
||||
@@ -1070,9 +1071,13 @@ async function runGitUpdate(params: {
|
||||
timeoutMs: effectiveTimeout,
|
||||
pkgRoot: params.root,
|
||||
});
|
||||
const installLocation =
|
||||
installTarget.manager === "pnpm"
|
||||
? resolvePnpmGlobalDirFromGlobalRoot(installTarget.globalRoot)
|
||||
: null;
|
||||
const installStep = await runUpdateStep({
|
||||
name: "global install",
|
||||
argv: globalInstallArgs(installTarget, updateRoot),
|
||||
argv: globalInstallArgs(installTarget, updateRoot, undefined, installLocation),
|
||||
cwd: updateRoot,
|
||||
env: installEnv,
|
||||
timeoutMs: effectiveTimeout,
|
||||
|
||||
Reference in New Issue
Block a user