Commit 8e58467c authored by Kaushik Kulkarni's avatar Kaushik Kulkarni Committed by Andreas Klöckner
Browse files

avoid calling `grep` when no match found

GREP(1) returns '1' when no lines are matched and that would terminate
the CI.
parent 0c2b9c0f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -124,8 +124,11 @@ pip_install_project()
    # Filter out any numpy requirements, install first. Otherwise some packages
    # might build against wrong version of numpy.
    # Context: https://github.com/numpy/numpy/issues/20709
    if grep -q "^numpy" "$REQUIREMENTS_TXT"; then
      echo "Installing numpy first to avoid numpy#20709."
      grep -e "^numpy" "$REQUIREMENTS_TXT" > ci-support-numpy-req.txt
      with_echo pip install -r ci-support-numpy-req.txt
    fi

    with_echo pip install -r "$REQUIREMENTS_TXT"
  fi