mirror of
https://github.com/pyenv/pyenv-update.git
synced 2025-11-08 03:23:48 -05:00
Update git status to use porcelain
pyenv-update was failing for me with the following errors, even though I had no local changes:
$ pyenv update
Updating /home/vagrant/.pyenv...
pyenv-update: /home/vagrant/.pyenv is not clean
Updating /home/vagrant/.pyenv/plugins/pyenv-doctor...
pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-doctor is not clean
Updating /home/vagrant/.pyenv/plugins/pyenv-pip-rehash...
pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-pip-rehash is not clean
Updating /home/vagrant/.pyenv/plugins/pyenv-update...
pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-update is not clean
Updating /home/vagrant/.pyenv/plugins/pyenv-virtualenvwrapper...
pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-virtualenvwrapper is not clean
Updating /home/vagrant/.pyenv/plugins/pyenv-which-ext...
pyenv-update: /home/vagrant/.pyenv/plugins/pyenv-which-ext is not clean
I've updated the script to use --porcelain instead of --short.
From the man page:
" --porcelain
Give the output in an easy-to-parse format for scripts. This is similar to the short output, but will remain
stable across Git versions and regardless of user configuration. See below for details."
This commit is contained in:
@@ -20,7 +20,7 @@ verify_repo_branch() {
|
||||
}
|
||||
|
||||
verify_repo_clean() {
|
||||
! ( cd "$1" && git status --short ) | grep -q -v '^[!?][!?]'
|
||||
! ( cd "$1" && git status --porcelain ) | grep -q -v '^[!?][!?]'
|
||||
}
|
||||
|
||||
verify_repo() {
|
||||
|
||||
Reference in New Issue
Block a user