Commit a54264963745656e6d4d7b71847af3f4c47360e6
1 parent
3e92539689
Refactorings on the selfupdate function.
Showing 1 changed file with 7 additions and 5 deletions Side-by-side Diff
antigen.zsh
... | ... | @@ -292,12 +292,14 @@ antigen-revert () { |
292 | 292 | |
293 | 293 | } |
294 | 294 | |
295 | +# Update (with `git pull`) antigen itself. | |
296 | +# TODO: Once update is finished, show a summary of the new commits, as a kind of | |
297 | +# "what's new" message. | |
295 | 298 | antigen-selfupdate () { |
296 | - ( | |
297 | - cd $_ANTIGEN_INSTALL_DIR | |
298 | - # Sanity checks | |
299 | - if [ ! -d .git ]; then | |
300 | - echo "antigen is not under git CVS" | |
299 | + ( cd $_ANTIGEN_INSTALL_DIR | |
300 | + if [[ ! -d .git ]]; then | |
301 | + echo "Your copy of antigen doesn't appear to be a git clone. " \ | |
302 | + "The 'selfupdate' command cannot work in this case." | |
301 | 303 | return 1 |
302 | 304 | fi |
303 | 305 | git pull |