loreanvictor / tmplr

Automate Code Scaffolding
MIT License
26 stars 0 forks source link

Remove command can't remove folders #15

Closed loreanvictor closed 1 year ago

loreanvictor commented 1 year ago

After adding support for glob patterns to remove command, the remove command can't remove folders (sandbox).

This is because NodeFS.ls() only lists files and not folders. It does that, because update and copy commands can't semantically copy folders.

Potential remedies are:

This bug was first identified by @tommy-mitchel here.

loreanvictor commented 1 year ago

I think it'll be wise to first implement the second fix, since:

As for the first solution, a few questions need to be answered first:

loreanvictor commented 1 year ago

I will close this issue for now, since removing folders by explicitly mentioning them seems to cover necessary use cases. If another use case comes up in the future, then this issue can be re-opened.