Skip to content

Commit efc61a6

Browse files
committed
fix(pgpm/cli): skip skill install in tests via PGPM_SKIP_SKILL_INSTALL env var
1 parent adc74dc commit efc61a6

3 files changed

Lines changed: 3 additions & 44 deletions

File tree

pgpm/cli/__tests__/__snapshots__/init.test.ts.snap

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,6 @@ exports[`cmds:init initializes module: module-only - files 1`] = `
5757
"packages/my-module/LICENSE",
5858
"packages/my-module/__tests__/basic.test.ts",
5959
".github/workflows/ci.yml",
60-
".agents/skills/pgpm/SKILL.md",
61-
".agents/skills/pgpm/references/workspace.md",
62-
".agents/skills/pgpm/references/troubleshooting.md",
63-
".agents/skills/pgpm/references/testing.md",
64-
".agents/skills/pgpm/references/template-authoring.md",
65-
".agents/skills/pgpm/references/starter-kits.md",
66-
".agents/skills/pgpm/references/sql-conventions.md",
67-
".agents/skills/pgpm/references/publishing.md",
68-
".agents/skills/pgpm/references/plan-format.md",
69-
".agents/skills/pgpm/references/pgpm-tables.md",
70-
".agents/skills/pgpm/references/pgpm-export.md",
71-
".agents/skills/pgpm/references/nextjs-app.md",
72-
".agents/skills/pgpm/references/module-naming.md",
73-
".agents/skills/pgpm/references/extensions.md",
74-
".agents/skills/pgpm/references/environment-configuration.md",
75-
".agents/skills/pgpm/references/env.md",
76-
".agents/skills/pgpm/references/docker.md",
77-
".agents/skills/pgpm/references/deploy-lifecycle.md",
78-
".agents/skills/pgpm/references/dependencies.md",
79-
".agents/skills/pgpm/references/cli.md",
80-
".agents/skills/pgpm/references/ci-cd.md",
81-
".agents/skills/pgpm/references/changes.md",
8260
]
8361
`;
8462

@@ -147,28 +125,6 @@ exports[`cmds:init initializes workspace: workspace - files 1`] = `
147125
"my-workspace/.gitignore",
148126
"my-workspace/.eslintrc.json",
149127
"my-workspace/.github/workflows/ci.yml",
150-
"my-workspace/.agents/skills/pgpm/SKILL.md",
151-
"my-workspace/.agents/skills/pgpm/references/workspace.md",
152-
"my-workspace/.agents/skills/pgpm/references/troubleshooting.md",
153-
"my-workspace/.agents/skills/pgpm/references/testing.md",
154-
"my-workspace/.agents/skills/pgpm/references/template-authoring.md",
155-
"my-workspace/.agents/skills/pgpm/references/starter-kits.md",
156-
"my-workspace/.agents/skills/pgpm/references/sql-conventions.md",
157-
"my-workspace/.agents/skills/pgpm/references/publishing.md",
158-
"my-workspace/.agents/skills/pgpm/references/plan-format.md",
159-
"my-workspace/.agents/skills/pgpm/references/pgpm-tables.md",
160-
"my-workspace/.agents/skills/pgpm/references/pgpm-export.md",
161-
"my-workspace/.agents/skills/pgpm/references/nextjs-app.md",
162-
"my-workspace/.agents/skills/pgpm/references/module-naming.md",
163-
"my-workspace/.agents/skills/pgpm/references/extensions.md",
164-
"my-workspace/.agents/skills/pgpm/references/environment-configuration.md",
165-
"my-workspace/.agents/skills/pgpm/references/env.md",
166-
"my-workspace/.agents/skills/pgpm/references/docker.md",
167-
"my-workspace/.agents/skills/pgpm/references/deploy-lifecycle.md",
168-
"my-workspace/.agents/skills/pgpm/references/dependencies.md",
169-
"my-workspace/.agents/skills/pgpm/references/cli.md",
170-
"my-workspace/.agents/skills/pgpm/references/ci-cd.md",
171-
"my-workspace/.agents/skills/pgpm/references/changes.md",
172128
]
173129
`;
174130

pgpm/cli/__tests__/init.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
jest.setTimeout(60000);
22
process.env.PGPM_SKIP_UPDATE_CHECK = 'true';
3+
process.env.PGPM_SKIP_SKILL_INSTALL = 'true';
34

45
import { PgpmPackage } from '@pgpmjs/core';
56
import { existsSync } from 'fs';

pgpm/cli/src/commands/init/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ interface InitContext {
291291
}
292292

293293
function installSkills(skills: BoilerplateSkill[], cwd: string, useNpxSkills: boolean): void {
294+
if (process.env.PGPM_SKIP_SKILL_INSTALL) return;
295+
294296
if (useNpxSkills) {
295297
installSkillsViaNpx(skills, cwd);
296298
} else {

0 commit comments

Comments
 (0)