Commit 5e2ff569 authored by Sam Stephenson's avatar Sam Stephenson
Browse files

fetch_git shows an error if git is not installed

parent 48590792
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -116,8 +116,13 @@ fetch_git() {
  local git_ref="$3"

  echo "Cloning ${git_url}..." >&2
  { git clone --depth 1 --branch "$git_ref" "$git_url" "${package_name}"
  } >&4 2>&1

  if type git 2>/dev/null; then
    git clone --depth 1 --branch "$git_ref" "$git_url" "${package_name}" >&4 2>&1
  else
    echo "error: please install \`git\` and try again" >&2
    exit 1
  fi
}

build_package() {