Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow laptop to run idempotently #156

Closed
djcp opened this Issue · 13 comments

5 participants

@djcp

I think this would be an excellent feature - allow laptop to run idempotently so that you can re-run with impunity and get new features if/when we add them. I'll take a look today, though I may need some osx testing at some point before a merge.

@djcp djcp was assigned
@gabebw
Admin

#155 ties into this. I'd love to help via Vagrant.

@gabebw
Admin

Postgres is a blocker, since it fails when it tries to re-init the DB (at least on Mac):

initdb: directory "/usr/local/var/postgres" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/usr/local/var/postgres" or run initdb
with an argument other than "/usr/local/var/postgres".
failed
@djcp

Yep. This works a bit different in debian derivatives, so my plan was to make this work there and ideally there'd be minimal changes for the osx side done by those who know osx best.

@djcp

See: #159

@dayne dayne referenced this issue from a commit
@dayne dayne rejiggered homebrew for #156 b463cd6
@croaky croaky referenced this issue from a commit
@dayne dayne rejiggered homebrew for #156 41a057f
@gabebw
Admin

@kevinSuttle Oh that's fancy.

@geoffharcourt geoffharcourt referenced this issue from a commit in geoffharcourt/laptop
@dayne dayne rejiggered homebrew for #156 2dff554
@kevinSuttle

Also, heads up. This is what happens when an individual component fails right now (in this case, Postgres) :

kevins-mbp:~ kevinsuttle$ zsh <(curl -s https://raw.github.com/thoughtbot/laptop/master/mac)

Installing Homebrew, a good OS X package manager ...
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
failed

kevins-mbp:~ kevinsuttle$ brew doctor
Your system is ready to brew.
kevins-mbp:~ kevinsuttle$ brew cleanup
kevins-mbp:~ kevinsuttle$ zsh <(curl -s https://raw.github.com/thoughtbot/laptop/master/mac)

Installing Homebrew, a good OS X package manager ...
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
failed

Somehow Laptop isn't able to catch this one.
https://github.com/thoughtbot/laptop/blob/master/mac#L49

@croaky
Admin

I noticed that this week as well and was hoping @pbrisbin's ! which brew &>/dev/null in #168 will fix it.

@pbrisbin

Yeah, the conditional is currently backwards (my bash-branch does fix it, but might be worth a hotfix):

if (( ! $+commands[brew] )); then
  # install homebrew
fi

EDIT: #174

@kevinSuttle

Any movement on this?

@djcp djcp added linux osx and removed linux labels
@djcp

f24f565 improves idempotency on the linux side but I can't close this until someone on the osx side has figured out what changes are necessary there.

@croaky
Admin

#216 should meet the mac script's idempotency goal.

@croaky
Admin

This should be all set now.

@croaky croaky closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.