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 +6 -3
- package/package.json +1 -1
- package/src/commands/start.ts +7 -4
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
|
-
|
|
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
|
-
|
|
2521
|
-
|
|
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
package/src/commands/start.ts
CHANGED
|
@@ -105,10 +105,13 @@ export async function start(
|
|
|
105
105
|
process.exit(1);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// Fetch latest
|
|
109
|
-
|
|
110
|
-
if (
|
|
111
|
-
console.
|
|
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
|