-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow auto-creating missing parent directories when using --target
#124
Comments
Thanks for the feedback. There's an unwritten assumption that any Stow target directory is going to be long-lived, and that creating new target directories happens very rarely. If this assumption is correct then I'm not sure I see much value in adding an extra option which doesn't seem to be much easier than just running a That said, maybe I am not understanding your use case, or why just doing |
That's a totally fair take! I am currently trying to set up my dotfiles repo with the goal of having as close to 100% the config I care about as possible be fully defined in one central place, so setting up new computers is as easy as possible. In the goal of having the process be as dead-simple as I can make it I am writing a script that I can run to set up any new computer in a single command (or at least that's the goal). This means that this script is designed to run on computers that are completely fresh out-of-the-box, and thus don't have a Now it is true that adding a I totally get that this is a niche situation, so if it doesn't fit in the scope of the project then I'll live with the Also while I'm here, I think another part of why I felt like something should change on |
I see, thanks - that makes sense. In that case I'd welcome a PR which adds a |
Currently pointing
--target
to a directory that doesn't yet exist results in the error:I understand why this is happening, but it makes using
stow
to manage certain use-cases (like installing into~/.config
on a fresh system) require an extramkdir
step first.It would be really nice if running
stow
with a--target
directory would automaticallymkdir -p
that target if it does not exist. Or if it can't be made the default, then I'd at least like a CLI option to enable this behavior.As an example, say that we have the following folder structure:
I would like to be able to run just
stow pkg1 --dir stow-root --target stow-target
and generate the following tree:Note that the target directory
./stow-target
was created when it previously did not exist.The text was updated successfully, but these errors were encountered: