unixorn / autoupdate-zgen

Autoupdate plugin for zgen
Apache License 2.0
20 stars 4 forks source link

prevent multiple shell instances to try updating at the same time #3

Closed hcgraf closed 9 years ago

hcgraf commented 9 years ago

In my case, when I log into my computer, several terminals are started and my tmux sessions with several shell windows are restored automatically. Every week, autoupdate-zgen tried to perform the update on every single shell, which of course caused some problems (luckily, nothing very serious, as git seems to be rather good with avoiding multiple pulls running at the same time). However, it's annoying, because you see a lot of error messages (failed git pull).

This commit only performs the update check & actual update in a single shell instance.

unixorn commented 9 years ago

Thanks for the contribution!

hcgraf commented 9 years ago

Thanks for already merging! I was just fixing the case of an older version of ZSH without the zsystem builtin. The version you merged still includes a bug such that we will NEVER check for updates on older zsh versions. I inverted the corresponding condition in my newest commit… Sorry for the little mess ;)

hcgraf commented 9 years ago

Do you need another pull request to include that fix? (Sorry, I'm a github-noob)

unixorn commented 9 years ago

Yes, now that I've merged, the new changes will need a new PR