Skip to content

Commit 09341fa

Browse files
committed
Fix install
1 parent e02eef3 commit 09341fa

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oh-my-opencode-slim",
3-
"version": "0.6.0",
3+
"version": "0.6.2",
44
"description": "Lightweight agent orchestration plugin for OpenCode - a slimmed-down fork of oh-my-opencode",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -30,6 +30,7 @@
3030
"homepage": "https://github.com/alvinunreal/oh-my-opencode-slim#readme",
3131
"files": [
3232
"dist",
33+
"src/skills",
3334
"README.md",
3435
"LICENSE"
3536
],

src/cli/custom-skills.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import {
55
readdirSync,
66
statSync,
77
} from 'node:fs';
8-
import { join, dirname } from 'node:path';
98
import { homedir } from 'node:os';
9+
import { dirname, join } from 'node:path';
10+
import { fileURLToPath } from 'node:url';
1011

1112
/**
1213
* A custom skill bundled in this repository.
@@ -74,12 +75,10 @@ function copyDirRecursive(src: string, dest: string): void {
7475
* @param projectRoot - Root directory of oh-my-opencode-slim project
7576
* @returns True if installation succeeded, false otherwise
7677
*/
77-
export function installCustomSkill(
78-
skill: CustomSkill,
79-
projectRoot: string,
80-
): boolean {
78+
export function installCustomSkill(skill: CustomSkill): boolean {
8179
try {
82-
const sourcePath = join(projectRoot, skill.sourcePath);
80+
const packageRoot = fileURLToPath(new URL('../..', import.meta.url));
81+
const sourcePath = join(packageRoot, skill.sourcePath);
8382
const targetPath = join(getCustomSkillsDir(), skill.name);
8483

8584
// Validate source exists

src/cli/install.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
isOpenCodeInstalled,
1010
writeLiteConfig,
1111
} from './config-manager';
12-
import { RECOMMENDED_SKILLS, installSkill } from './skills';
1312
import { CUSTOM_SKILLS, installCustomSkill } from './custom-skills';
13+
import { installSkill, RECOMMENDED_SKILLS } from './skills';
1414
import type {
1515
BooleanArg,
1616
ConfigMergeResult,
@@ -311,10 +311,9 @@ async function runInstall(config: InstallConfig): Promise<number> {
311311
if (config.installCustomSkills) {
312312
printStep(step++, totalSteps, 'Installing custom skills...');
313313
let customSkillsInstalled = 0;
314-
const projectRoot = process.cwd(); // Assumes running from project root
315314
for (const skill of CUSTOM_SKILLS) {
316315
printInfo(`Installing ${skill.name}...`);
317-
if (installCustomSkill(skill, projectRoot)) {
316+
if (installCustomSkill(skill)) {
318317
printSuccess(`Installed: ${skill.name}`);
319318
customSkillsInstalled++;
320319
} else {

0 commit comments

Comments
 (0)