php7.1.4がでたのでインストールしようとanyenv update
したらこんなエラーがでた。
$ anyenv update
Updating 'anyenv'...
Updating 'anyenv/anyenv-update'...
Updating 'phpenv'...
Updating 'phpenv/php-build'...
| From https://github.com/php-build/php-build
| 6da869a..85a1dcf master -> origin/master
| * [new branch] xdebug -> origin/xdebug
| error: Your local changes to the following files would be overwritten by merge:
| share/php-build/definitions/7.1.0
| share/php-build/definitions/7.1.3
| Please commit your changes or stash them before you merge.
| Aborting
| Failed to update. Use 'verbose' option for detailed, or 'force' option.
Updating 'phpenv/phpenv-composer'...
どうやらanyenv update
は、git pull
してるだけのよう(たぶん)で、昔修正したdefinitionsとコンフリクトしている模様。
git stash
でいったん退避してanyenv update
したらいけた。
$ cd ~/.anyenv/envs/phpenv/plugins/php-build
$ git stash
$ anyenv update
Updating 'anyenv'...
Updating 'anyenv/anyenv-update'...
Updating 'phpenv'...
Updating 'phpenv/php-build'...
Updating 'phpenv/phpenv-composer'...
最後にgit stash apply
で退避した変更をもどしておく。
$ git stash apply
Auto-merging share/php-build/definitions/7.1.3
Auto-merging share/php-build/definitions/7.1.0
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: share/php-build/definitions/7.1.0
modified: share/php-build/definitions/7.1.3
no changes added to commit (use "git add" and/or "git commit -a")