zdev 0.1.4 → 0.1.5

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
@@ -2515,10 +2515,13 @@ async function start(featureName, projectPath = ".", options = {}) {
2515
2515
  console.log(` Run: zdev stop ${featureName} --project ${fullPath}`);
2516
2516
  process.exit(1);
2517
2517
  }
2518
- console.log(`
2518
+ const hasOrigin = run("git", ["remote", "get-url", "origin"], { cwd: fullPath });
2519
+ if (hasOrigin.success) {
2520
+ console.log(`
2519
2521
  \uD83D\uDCE5 Fetching latest from origin...`);
2520
- if (!gitFetch(fullPath)) {
2521
- console.error(` Failed to fetch, continuing anyway...`);
2522
+ if (!gitFetch(fullPath)) {
2523
+ console.error(` Failed to fetch, continuing anyway...`);
2524
+ }
2522
2525
  }
2523
2526
  console.log(`
2524
2527
  \uD83C\uDF33 Creating worktree...`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zdev",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Multi-agent worktree development environment for cloud dev with preview URLs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -105,10 +105,13 @@ export async function start(
105
105
  process.exit(1);
106
106
  }
107
107
 
108
- // Fetch latest
109
- console.log(`\nšŸ“„ Fetching latest from origin...`);
110
- if (!gitFetch(fullPath)) {
111
- console.error(` Failed to fetch, continuing anyway...`);
108
+ // Fetch latest (only if origin remote exists)
109
+ const hasOrigin = run("git", ["remote", "get-url", "origin"], { cwd: fullPath });
110
+ if (hasOrigin.success) {
111
+ console.log(`\nšŸ“„ Fetching latest from origin...`);
112
+ if (!gitFetch(fullPath)) {
113
+ console.error(` Failed to fetch, continuing anyway...`);
114
+ }
112
115
  }
113
116
 
114
117
  // Create worktree