mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
chore: update .gitignore and improve cleanup handling in scripts
- Added .claude/hans/ to .gitignore to prevent tracking of specific directory. - Updated cleanup calls in dev.mjs and start.mjs to use await for proper asynchronous handling. - Enhanced error handling during cleanup in case of failures. - Improved server failure handling in startServerAndWait function to ensure proper termination of failed processes.
This commit is contained in:
10
dev.mjs
10
dev.mjs
@@ -117,7 +117,7 @@ async function main() {
|
||||
});
|
||||
|
||||
if (!processes.server) {
|
||||
cleanup();
|
||||
await cleanup();
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@@ -175,9 +175,13 @@ async function main() {
|
||||
}
|
||||
|
||||
// Run main function
|
||||
main().catch((err) => {
|
||||
main().catch(async (err) => {
|
||||
console.error(err);
|
||||
const cleanup = createCleanupHandler(processes);
|
||||
cleanup();
|
||||
try {
|
||||
await cleanup();
|
||||
} catch (cleanupErr) {
|
||||
console.error('Cleanup error:', cleanupErr);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user