clawt 2.3.3 → 2.3.4

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/dist/index.js CHANGED
@@ -1266,6 +1266,7 @@ function formatConfigValue(value) {
1266
1266
 
1267
1267
  // src/commands/sync.ts
1268
1268
  import { existsSync as existsSync8 } from "fs";
1269
+ import { join as join6 } from "path";
1269
1270
  function registerSyncCommand(program2) {
1270
1271
  program2.command("sync").description("\u5C06\u4E3B\u5206\u652F\u6700\u65B0\u4EE3\u7801\u540C\u6B65\u5230\u76EE\u6807 worktree").requiredOption("-b, --branch <branchName>", "\u8981\u540C\u6B65\u7684\u5206\u652F\u540D").action(async (options) => {
1271
1272
  await handleSync(options);
@@ -1293,7 +1294,7 @@ async function handleSync(options) {
1293
1294
  const { branch } = options;
1294
1295
  logger.info(`sync \u547D\u4EE4\u6267\u884C\uFF0C\u5206\u652F: ${branch}`);
1295
1296
  const projectWorktreeDir = getProjectWorktreeDir();
1296
- const targetWorktreePath = `${projectWorktreeDir}/${branch}`;
1297
+ const targetWorktreePath = join6(projectWorktreeDir, branch);
1297
1298
  if (!existsSync8(targetWorktreePath)) {
1298
1299
  throw new ClawtError(MESSAGES.WORKTREE_NOT_FOUND(branch));
1299
1300
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawt",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "本地并行执行多个Claude Code Agent任务,融合 Git Worktree 与 Claude Code CLI 的命令行工具",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,4 +1,5 @@
1
1
  import { existsSync } from 'node:fs';
2
+ import { join } from 'node:path';
2
3
  import type { Command } from 'commander';
3
4
  import { logger } from '../logger/index.js';
4
5
  import { ClawtError } from '../errors/index.js';
@@ -81,7 +82,7 @@ async function handleSync(options: SyncOptions): Promise<void> {
81
82
 
82
83
  // 检查目标 worktree 是否存在
83
84
  const projectWorktreeDir = getProjectWorktreeDir();
84
- const targetWorktreePath = `${projectWorktreeDir}/${branch}`;
85
+ const targetWorktreePath = join(projectWorktreeDir, branch);
85
86
 
86
87
  if (!existsSync(targetWorktreePath)) {
87
88
  throw new ClawtError(MESSAGES.WORKTREE_NOT_FOUND(branch));