adobe / create-aio-lib

CLI tool to create Adobe I/O Libs (npm init @adobe/aio-lib)
Apache License 2.0
2 stars 5 forks source link

overwrite flag not working #75

Closed purplecabbage closed 1 year ago

purplecabbage commented 1 year ago

Expected Behaviour

Using the --overwrite | -w flag overwrites an existing dest

Actual Behaviour

> create-aio-lib lib-name repo-name
 ›   Error: Destination /Users/jessem/repos/adobe/aio-all/test/sdk-mod-template-test/lib-name exists, use the '--overwrite' flag to 
 ›   overwrite.

> create-aio-lib lib-name repo-name --overwrite
✔ Copy template
✔ Copy template
✔ Remove .git folder
✔ Read parameters file
✔ Update package.json
✔ Replace text
✔ Cleanup
✔ Lib created at /Users/jessem/repos/adobe/aio-all/test/sdk-mod-template-test/lib-name
/Users/jessem/repos/adobe/aio-all/create-aio-lib/node_modules/fs-extra/lib/move/move.js:41
    if (destExists) return cb(new Error('dest already exists.'))
                              ^

Error: dest already exists.
    at /Users/jessem/repos/adobe/aio-all/create-aio-lib/node_modules/fs-extra/lib/move/move.js:41:31
    at /Users/jessem/repos/adobe/aio-all/create-aio-lib/node_modules/fs-extra/node_modules/universalify/index.js:22:54

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem