mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-17 15:00:46 +00:00
@@ -69,8 +69,6 @@ function expectNpmInstallIntoRoot(params: { calls: unknown[][]; npmRoot: string
|
||||
"--ignore-scripts",
|
||||
"--no-audit",
|
||||
"--no-fund",
|
||||
"--prefix",
|
||||
".",
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -290,9 +288,7 @@ function mockNpmViewAndInstallMany(packages: MockNpmPackage[]) {
|
||||
);
|
||||
}
|
||||
if (argv[0] === "npm" && argv[1] === "install") {
|
||||
const prefixIndex = argv.indexOf("--prefix");
|
||||
const prefixValue = prefixIndex >= 0 ? argv[prefixIndex + 1] : undefined;
|
||||
const npmRoot = prefixValue === "." ? options?.cwd : prefixValue;
|
||||
const npmRoot = options?.cwd;
|
||||
if (!npmRoot) {
|
||||
throw new Error(`unexpected npm install command: ${argv.join(" ")}`);
|
||||
}
|
||||
@@ -345,9 +341,7 @@ function mockNpmViewAndInstallMany(packages: MockNpmPackage[]) {
|
||||
if (argv[0] === "npm" && argv[1] === "uninstall") {
|
||||
const packageName = argv.at(-1);
|
||||
if (packageName === "openclaw") {
|
||||
const prefixIndex = argv.indexOf("--prefix");
|
||||
const prefixValue = prefixIndex >= 0 ? argv[prefixIndex + 1] : undefined;
|
||||
const npmRoot = prefixValue === "." ? options?.cwd : prefixValue;
|
||||
const npmRoot = options?.cwd;
|
||||
if (!npmRoot) {
|
||||
throw new Error(`unexpected npm uninstall command: ${argv.join(" ")}`);
|
||||
}
|
||||
|
||||
@@ -328,8 +328,6 @@ async function rollbackManagedNpmPluginInstall(params: {
|
||||
"--ignore-scripts",
|
||||
"--no-audit",
|
||||
"--no-fund",
|
||||
"--prefix",
|
||||
".",
|
||||
params.packageName,
|
||||
],
|
||||
{
|
||||
@@ -499,8 +497,6 @@ async function installPluginFromManagedNpmRoot(
|
||||
noAudit: true,
|
||||
noFund: true,
|
||||
}),
|
||||
"--prefix",
|
||||
".",
|
||||
],
|
||||
{
|
||||
cwd: npmRoot,
|
||||
|
||||
@@ -992,8 +992,6 @@ describe("uninstallPlugin", () => {
|
||||
"--ignore-scripts",
|
||||
"--no-audit",
|
||||
"--no-fund",
|
||||
"--prefix",
|
||||
".",
|
||||
"@openclaw/kitchen-sink",
|
||||
],
|
||||
expect.objectContaining({
|
||||
@@ -1128,8 +1126,6 @@ describe("uninstallPlugin", () => {
|
||||
"--ignore-scripts",
|
||||
"--no-audit",
|
||||
"--no-fund",
|
||||
"--prefix",
|
||||
".",
|
||||
"missing-plugin",
|
||||
],
|
||||
expect.objectContaining({
|
||||
|
||||
@@ -611,8 +611,6 @@ export async function applyPluginUninstallDirectoryRemoval(
|
||||
"--ignore-scripts",
|
||||
"--no-audit",
|
||||
"--no-fund",
|
||||
"--prefix",
|
||||
".",
|
||||
removal.cleanup.packageName,
|
||||
],
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user