Repository: flink Updated Branches: refs/heads/release-1.4 492dcb176 -> 7610b597b
[FLINK-9110] [docs] Fix local bundler installation This closes #5788. Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/7610b597 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/7610b597 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/7610b597 Branch: refs/heads/release-1.4 Commit: 7610b597b49676299b2dc609d6fd60d4bdccfa2e Parents: 492dcb1 Author: Nico Kruber <n...@data-artisans.com> Authored: Thu Mar 29 15:55:47 2018 +0200 Committer: Timo Walther <twal...@apache.org> Committed: Wed Apr 4 18:17:49 2018 +0200 ---------------------------------------------------------------------- docs/build_docs.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/7610b597/docs/build_docs.sh ---------------------------------------------------------------------- diff --git a/docs/build_docs.sh b/docs/build_docs.sh index f9ffc5a..aa08f4c 100755 --- a/docs/build_docs.sh +++ b/docs/build_docs.sh @@ -27,16 +27,18 @@ DIR="`pwd`" # We need at least bundler to proceed if [ "`command -v bundle`" == "" ]; then - echo "WARN: Could not find bundle." - echo "Attempting to install locally. If this doesn't work, please install with 'gem install bundler'." + RUBYGEM_BINDIR="" - # Adjust the PATH to discover the locally installed Ruby gem - if which ${RUBY} >/dev/null && which gem >/dev/null; then - export PATH="$(${RUBY} -rubygems -e 'puts Gem.user_dir')/bin:$PATH" - fi + # Adjust the PATH to discover locally installed ruby gem binaries + export PATH="$(${RUBY} -e 'puts Gem.user_dir')/bin:$PATH" - # install bundler locally - ${GEM} install --user-install bundler + if [ "`command -v bundle`" == "" ]; then + echo "WARN: Could not find bundle." + echo "Attempting to install locally. If this doesn't work, please install with 'gem install bundler'." + + # install bundler locally + ${GEM} install --user-install --no-format-executable bundler + fi fi # Install Ruby dependencies locally @@ -57,7 +59,6 @@ while getopts "pi" opt; do ;; i) [[ `${RUBY} -v` =~ 'ruby 1' ]] && echo "Error: building the docs with the incremental option requires at least ruby 2.0" && exit 1 - bundle install --path .rubydeps JEKYLL_CMD="liveserve --baseurl= --watch --incremental" ;; esac