genbox 1.0.56 → 1.0.57
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/commands/rebuild.js +4 -3
- package/package.json +1 -1
package/dist/commands/rebuild.js
CHANGED
|
@@ -494,9 +494,10 @@ exports.rebuildCommand = new commander_1.Command('rebuild')
|
|
|
494
494
|
const effectiveApps = storedApps; // Use stored apps for rebuild
|
|
495
495
|
// For branch: CLI options override, then stored newBranch (if it was created), then stored branch
|
|
496
496
|
const effectiveBranch = options.branch || storedNewBranch || storedBranch;
|
|
497
|
-
// For new branch creation:
|
|
498
|
-
|
|
499
|
-
const
|
|
497
|
+
// For new branch creation: use CLI options OR stored values (to re-create branch if first attempt failed)
|
|
498
|
+
// If storedNewBranch exists with storedSourceBranch, the branch may not have been created yet
|
|
499
|
+
const effectiveNewBranch = newBranchName || (storedNewBranch && storedSourceBranch ? storedNewBranch : undefined);
|
|
500
|
+
const effectiveSourceBranch = options.fromBranch || (storedNewBranch && storedSourceBranch ? storedSourceBranch : undefined);
|
|
500
501
|
// For database: use CLI option, or stored database config (convert 'snapshot' to 'copy')
|
|
501
502
|
const storedDbMode = genbox.database?.mode === 'snapshot' ? 'copy' : genbox.database?.mode;
|
|
502
503
|
const effectiveDbMode = options.db || storedDbMode;
|