Skip to content

Catch DEST_NOT_EMPTY error #11

@cossssmin

Description

@cossssmin

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions