mirror of
https://github.com/siteboon/claudecodeui.git
synced 2025-12-08 23:39:38 +00:00
Merge remote-tracking branch 'origin/feature/new-project-creation' into feature/new-project-creation
This commit is contained in:
@@ -251,7 +251,12 @@ router.post('/create-workspace', async (req, res) => {
|
||||
await cloneGitHubRepository(githubUrl, absolutePath, githubToken);
|
||||
} catch (error) {
|
||||
// Clean up created directory on failure
|
||||
await fs.rm(absolutePath, { recursive: true, force: true });
|
||||
try {
|
||||
await fs.rm(absolutePath, { recursive: true, force: true });
|
||||
} catch (cleanupError) {
|
||||
console.error('Failed to clean up directory after clone failure:', cleanupError);
|
||||
// Continue to throw original error
|
||||
}
|
||||
throw new Error(`Failed to clone repository: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user