Git Product home page Git Product logo

Comments (6)

jescalan avatar jescalan commented on July 18, 2024

I suppose, but really you'd have to be insane to type that and expect a good result. What's happening here, as you know, is that you are creating a new roots project called the name of the current folder. So it makes sense that it would overwrite the current folder with the new roots project. I can manually prevent the user from entering . or .. as the name, would that help?

from roots.

samccone avatar samccone commented on July 18, 2024

hmm we could just throw a warning @Jenius like are you sure bro?

from roots.

dz0ny avatar dz0ny commented on July 18, 2024

@Jenius Overwriting is fine, but not deleting everything in that folder, same goes for (roots new ./project). Root should only delete its own files. Here is user-case:

I was experimenting with deployd. Created new project with dpd init, then noticed I have empty public folder. Great let's try roots, roots new . puff. Everything gone (package.json,.git...) you get the point, how bad it is to delete everything. Also because command deletes folder and creates new, bash complained it lost pwd handle o.O.

from roots.

Kazy avatar Kazy commented on July 18, 2024

I also expect roots new app to write its files, overwriting them if they already exist, but not delete the whole directory. As @samccone said, it should at least warn the user.

from roots.

samccone avatar samccone commented on July 18, 2024

ok @dz0ny and @Kazy thanks for the feedback, this should fix it 💃

from roots.

samccone avatar samccone commented on July 18, 2024

closing it now that is has been merged

from roots.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.