Giter VIP home page Giter VIP logo

Comments (2)

aspiers avatar aspiers commented on May 31, 2024

I think that would be too dangerous to enable in general. Whilst a lot of Stow packages share top-level directories such as bin/, lib/, that wouldn't necessarily be a problem because we could make it avoid adopting folders which are already controlled by Stow. But it would often be a problem the first time any package was stowed into a given target directory, e.g. if ~/bin/ or /usr/local/bin already existed and contained files or directories which should not be adopted into the package being stowed.

Maybe we could allow this in carefully controlled circumstances, such as --adopt-folder=bin, but then how is that any better than just doing

mv $target_dir/bin $stow_package

before running a normal stow command? So I'm not convinced the benefits of implementing this outweigh the dangers. However I'm very willing to be persuaded otherwise, if you can give a concrete real-world example which explains your use case!

from stow.

aspiers avatar aspiers commented on May 31, 2024

Borrowing from ideas in #24, maybe the benefits are worth it after all:

  • verify that the target_dir file is not a symlink (which needs to be smarter, it should actually check if it's a non-stow symlink)
  • verify that the stow_package contains the appropriate parent dirs (essentially mkdir -p $(dirname ...))
  • bail if the directory already exists in the package, rather than accidentally moving the new one from the target directory to underneath the existing one in the package tree.

So I think I'm now persuaded otherwise - pull requests very welcome!

from stow.

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.