@dezkareid/osddt 1.11.12 → 1.11.14
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 +13 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1019,6 +1019,19 @@ async function runDone(featureName, cwd, worktree) {
|
|
|
1019
1019
|
console.error(`Error: working-on/${featureName} does not exist.`);
|
|
1020
1020
|
process.exit(1);
|
|
1021
1021
|
}
|
|
1022
|
+
if (worktree && worktreePath && (await fs.pathExists(worktreePath))) {
|
|
1023
|
+
try {
|
|
1024
|
+
const status = execSync('git status --porcelain', { cwd: worktreePath, encoding: 'utf8', stdio: 'pipe' });
|
|
1025
|
+
if (status.trim().length > 0) {
|
|
1026
|
+
console.error('Error: Worktree has uncommitted changes. Commit or stash them before running osddt done.');
|
|
1027
|
+
process.exit(1);
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
catch {
|
|
1031
|
+
console.error('Error: Could not verify worktree status. Ensure the worktree is a valid git repository and has no uncommitted changes before proceeding.');
|
|
1032
|
+
process.exit(1);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1022
1035
|
await fs.ensureDir(path.dirname(dest));
|
|
1023
1036
|
await fs.move(src, dest);
|
|
1024
1037
|
console.log(`Moved: working-on/${featureName} → done/${destName}`);
|