opencode-worktree 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/opencode-worktree +4 -2
- package/package.json +1 -1
package/bin/opencode-worktree
CHANGED
|
@@ -6,10 +6,12 @@ import os from 'node:os';
|
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
import updateNotifier from 'update-notifier';
|
|
9
|
-
import pkg from '../package.json' assert { type: 'json' };
|
|
10
9
|
|
|
11
10
|
const __filename = fileURLToPath(import.meta.url);
|
|
12
11
|
const __dirname = path.dirname(__filename);
|
|
12
|
+
const pkg = JSON.parse(
|
|
13
|
+
fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8'),
|
|
14
|
+
);
|
|
13
15
|
|
|
14
16
|
updateNotifier({ pkg }).notify({ isGlobal: true });
|
|
15
17
|
|
|
@@ -49,7 +51,7 @@ const detectPlatformAndArch = () => {
|
|
|
49
51
|
const resolveBinaryPath = () => {
|
|
50
52
|
const { platform } = detectPlatformAndArch();
|
|
51
53
|
const binaryName = platform === 'windows' ? 'opencode-worktree.exe' : 'opencode-worktree-bin';
|
|
52
|
-
const binaryPath = path.join(__dirname, 'bin', binaryName);
|
|
54
|
+
const binaryPath = path.join(__dirname, '..', 'bin', binaryName);
|
|
53
55
|
|
|
54
56
|
if (!fs.existsSync(binaryPath)) {
|
|
55
57
|
throw new Error(
|