diff options
author | Iulian Onofrei <6d0847b9@opayq.com> | 2018-09-09 01:39:23 +0300 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-09-09 00:39:23 +0200 |
commit | 08a280863661dd44aad20d494187d9c4ba12fac9 (patch) | |
tree | 736b865ef7ace962b73aedbc3942b270bae8cef8 /plugins/bundler/bundler.plugin.zsh | |
parent | f75d096c1a3863b84cb9788d0934babe4cd3c577 (diff) | |
download | zsh-08a280863661dd44aad20d494187d9c4ba12fac9.tar.gz zsh-08a280863661dd44aad20d494187d9c4ba12fac9.tar.bz2 zsh-08a280863661dd44aad20d494187d9c4ba12fac9.zip |
Fix incorrect error message when running bi without having bundler installed (#7112)
Diffstat (limited to 'plugins/bundler/bundler.plugin.zsh')
-rw-r--r-- | plugins/bundler/bundler.plugin.zsh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index b0b286af5..668e15d2f 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -54,8 +54,12 @@ done ## Functions bundle_install() { - if _bundler-installed && _within-bundled-project; then - local bundler_version=`bundle --version | cut -d' ' -f3` + if ! _bundler-installed; then + echo "Bundler is not installed" + elif ! _within-bundled-project; then + echo "Can't 'bundle install' outside a bundled project" + else + local bundler_version=`bundle version | cut -d' ' -f3` if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then if [[ "$OSTYPE" = (darwin|freebsd)* ]] then @@ -67,8 +71,6 @@ bundle_install() { else bundle install $@ fi - else - echo "Can't 'bundle install' outside a bundled project" fi } |