aspiers / stow

GNU Stow - mirror of savannah git repository occasionally with more bleeding-edge branches
http://www.gnu.org/s/stow/
GNU General Public License v3.0
650 stars 41 forks source link

chkstow incorrectly assumes /usr/local exists #72

Open wdkrnls opened 4 years ago

wdkrnls commented 4 years ago

I'm running Stow on Guix where /usr/local does not exist by default. Considering that Stow is now frequently used for managing .dotfiles, would it make sense to make the default target directory the users home directory instead? That will probably always exist no matter the distribution. Alternatively, does a default target directory need to be set at all?

FichteFoll commented 4 years ago

What does 'default target directory' mean here? The default is "the parent of the stow directory", where the stow directory is the current working directory (don't think this can be changed). If you just mean for the documentation, then I don't think this is warranted, as the example usage of /usr/local is clearly explained in that, imo.

Regardless, changing the default target directory would be a huge breaking change. Even requiring a target directory to be specified would be a breaking change. (Not as huge because it could still notify and the user about the missing parameter instead of doing something unexpected, but still unacceptable in my opinion.)

FichteFoll commented 4 years ago

Oh, I just now after posting realized this is talking about chkstow. That should mirror stow's logic for determining the stow directory, imo. Probably consider .stowrc also.

wdkrnls commented 4 years ago

Yes, I am referring to the $ENV[STOW_DIR] || '/usr/local' logic at the top of (only) the chkstow utility source code.