Skip to content
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

hard code location of ~/.yadr #58

Closed
dedward opened this issue Mar 21, 2012 · 13 comments
Closed

hard code location of ~/.yadr #58

dedward opened this issue Mar 21, 2012 · 13 comments
Assignees

Comments

@dedward
Copy link

dedward commented Mar 21, 2012

One time I wnated to start fresh so renamed ~/.yadr to something else and and re-installed yadr.
After a bit I realized the yadr-home detection mechanism was finding the .yadr file inside my renamed .yadr folder first, causing the old version to be used. A slightly more robust solution would be good (or a manual one?)

@kylewest
Copy link
Collaborator

Any ideas for a more robust way of finding YADR? It does only look in first level directories in home so if you moved it out of home it would have worked.

@dedward
Copy link
Author

dedward commented Mar 24, 2012

I moved it into something in the home folder.

Your detection mechanism, if I have it right, is to scan all directories 1 level deep in $HOME/ and look for a file called .yadr, and if it exists, that's your YADR install folder.
I'd say go the opinionated way and just declare "it has to be in .yadr" skip the search.

Or if you want to keep the search - add something that varies and gets added during install - have a version in the contents of the .yadr file that your install script looks for, and have it updated in the Rakefile along with the .yadr file so you can't accidentally install twice. New version = updated rakefile = updated yadr file.
I'd go with the simple "it lives in .yadr - it's opinionated, remember?"

@dedward
Copy link
Author

dedward commented Mar 24, 2012

Oh, and for all issues (more releavnt to the install/update procedure) - I'd say try to stick to standard system default tools by full path for install/remove/upgrade procedures as much as possible rather than ruby/etc. if someone (like me) has mucked with system path settings outside of just the shell (like in OSX, launchd, etc) it would get unpredictable.

@kylewest
Copy link
Collaborator

kylewest commented Apr 5, 2012

@skwp what do you think about this? Searching for .yadr is a bit of a PITA, but I know you're worried about backwards compatibility.

@skwp
Copy link
Owner

skwp commented Apr 5, 2012

I think too much magic is bad. I woudl actually prefer to go back to the old way of saying yadr has to be in ~/.yadr and end of story. People can always symlink it if they want to keep it in dropbox or what have you. Instead of engineering more and more complex ways of dealing with it, let's take a stand on where it should live and simplify everyone's lives?

@skwp
Copy link
Owner

skwp commented Apr 5, 2012

So I like @dedward idea of going back to saying ~/.yadr or bust

@kylewest
Copy link
Collaborator

kylewest commented Apr 5, 2012

agreed. if we can decree it lives in .yadr I can get to work on #58 too.

@skwp
Copy link
Owner

skwp commented Apr 5, 2012

yeah let's do that. Do you want to do it or should I?

@kylewest
Copy link
Collaborator

kylewest commented Apr 5, 2012

I can commit some time later this week. If you can merge in #65 #66 before I get going that may save me a merge.

@skwp
Copy link
Owner

skwp commented Apr 5, 2012

merged, thanks. there was a smal bug with aliases.zsh reference but I fixed it. please make sure the readme is up to date with the new stuff when you're done :) thanks @kylewest !

@skwp
Copy link
Owner

skwp commented Aug 9, 2012

I do prefer to hardcode to ~/.yadr rather than leaving that configurable. That's extra complexity for very little reason..

@skwp
Copy link
Owner

skwp commented Aug 20, 2012

Guys can you please review https://github.com/tUrG0n/dotfiles/commit/31fc64152d14d09df7cf877897b6bd7e68d511a9#commitcomment-1740200 to see if it solves the hardcoded location issue

@kylewest
Copy link
Collaborator

I'm going to close this in favor of code being developed in #131. Please comment or reopen if appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants