fix(deepseek): find pnpm when installing the terminal profile, and install it with dsh

This commit is contained in:
Devvyn committed 2026-10-10 14:27:54 +08:00
1 parent 3d59e59e37
commit b7be8db80b
7 files changed
+36 -8

No files matched your search

@@ -0,0 +1,18 @@
import { describe, it, expect } from 'vitest';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { STOCK_CLIS } from '../src/config/cli-registry/stock.js';
const root = resolve(import.meta.dirname, '..');
describe('DeepSeek install', () => {
it('installs pnpm with dsh, since `dsh plugin` spawns a literal pnpm', () => {
const ds = STOCK_CLIS.find((c) => (c.id as string) === 'deepseek')!;
expect(ds.discovery.install.command?.linux).toBe('npm install -g @deepseek-ai/dsh pnpm');
});
it("puts dsh's own directory first on the profile install's PATH", () => {
const src = readFileSync(resolve(root, 'src/web/routes/system-routes.ts'), 'utf8');
expect(src).toMatch(/env: \{ \.\.\.process\.env, PATH: \[dir, process\.env\.PATH\]/);
});
});