Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch DEST_NOT_EMPTY error #11

Open
cossssmin opened this issue Apr 10, 2024 · 1 comment
Open

Catch DEST_NOT_EMPTY error #11

cossssmin opened this issue Apr 10, 2024 · 1 comment

Comments

@cossssmin
Copy link
Member

If we try scaffolding a project to an existing directory, the operation will fail as expected.

But we're not catching that error so the spinner goes on:

DegitError: destination directory is not empty, aborting. Use options.force to override
    at Degit._checkDirIsEmpty (\create-maizzle\node_modules\degit\dist\index-688c5d50.js:14171:12)
    at Degit.clone (\create-maizzle\node_modules\degit\dist\index-688c5d50.js:14089:8)
    at main (file:///create-maizzle/src/index.js:109:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'DEST_NOT_EMPTY'
}
◑  Creating project...
@cossssmin
Copy link
Member Author

Additionally, we could support a --force flag to force copying the files to the destination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant