diff --git a/cli/src/__tests__/install-command.test.ts b/cli/src/__tests__/install-command.test.ts index 13335bb2161..7e5557e9d52 100644 --- a/cli/src/__tests__/install-command.test.ts +++ b/cli/src/__tests__/install-command.test.ts @@ -4,6 +4,7 @@ import path from "node:path"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { installCommand, installGitPayload, resolveGitHubRef, resolveGitInstallRequest, resolveNpmInstallRequest } from "../commands/install.js"; import { uninstallCommand } from "../commands/uninstall.js"; +import { resolvePaperclipInstanceId } from "../config/home.js"; import { INSTALL_MANIFEST_VERSION, flipCurrentAtomic, @@ -15,6 +16,7 @@ import { writeInstallManifestAtomic, } from "../install-store.js"; import { resolveCliVersion } from "../version.js"; +import { systemdServiceName } from "../services/service-manager.js"; const ORIGINAL_ENV = { ...process.env }; @@ -171,7 +173,7 @@ describe("managed install commands", () => { ".config", "systemd", "user", - "paperclipai.service", + systemdServiceName(resolvePaperclipInstanceId()), ); fs.mkdirSync(path.dirname(unitPath), { recursive: true }); fs.writeFileSync(unitPath, "unit"); diff --git a/cli/src/__tests__/update-command.test.ts b/cli/src/__tests__/update-command.test.ts index f1c114bfbeb..2bcf133e907 100644 --- a/cli/src/__tests__/update-command.test.ts +++ b/cli/src/__tests__/update-command.test.ts @@ -98,7 +98,7 @@ describe("update command", () => { vi.stubEnv("NPM_CONFIG_REGISTRY", "http://attacker-registry.invalid"); fs.mkdirSync(process.env.HOME!, { recursive: true }); fs.writeFileSync(path.join(process.env.HOME!, ".npmrc"), "registry=http://attacker-registry.invalid\n"); - const runCommand = vi.fn(async (_file: string, args: string[], commandOptions?: Parameters[2]) => { + const runCommand = vi.fn(async (_file, args, commandOptions) => { if (args[0] === "view") return { stdout: '"2.0.0"\n', stderr: "" }; expect(args).toContain("--registry=https://registry.npmjs.org"); expect(args).toContain("--@paperclipai:registry=https://registry.npmjs.org");