This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new fd5711067d [CI] Fix crash when grep finds no matches (#18457)
fd5711067d is described below
commit fd5711067d99834097ee6eab8370e11423d85383
Author: Guan-Ming (Wesley) Chiu <[email protected]>
AuthorDate: Sun Nov 16 21:21:18 2025 +0800
[CI] Fix crash when grep finds no matches (#18457)
## Why
- The original implementation would crash when grep returned a non-zero
exit code (pattern not found)
## How
- Add `|| true` to prevent early return
- Minor update: remove redundant stage definiation since we got default
stage config
## Result
if I don't have ci docker images installed
**before**
<img width="686" height="65" alt="image"
src="https://github.com/user-attachments/assets/b6ec2fdb-2bcc-4441-9e8f-fa391d54e17f"
/>
**after**
<img width="1207" height="304" alt="image"
src="https://github.com/user-attachments/assets/877321a2-88ca-4ac3-946c-2285b668323e"
/>
---
.pre-commit-config.yaml | 3 +--
docker/dev_common.sh | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 4377602ebf..d455a14500 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -43,9 +43,8 @@ repos:
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- stages: [pre-push]
- id: trailing-whitespace
- stages: [pre-push]
+
- repo: local
hooks:
- id: run-black
diff --git a/docker/dev_common.sh b/docker/dev_common.sh
index 763da67ef8..fd5a8f91bd 100755
--- a/docker/dev_common.sh
+++ b/docker/dev_common.sh
@@ -27,8 +27,7 @@ INVOCATION_PWD="$(pwd)"
GIT_TOPLEVEL=$(cd $(dirname ${BASH_SOURCE[0]}) && git rev-parse
--show-toplevel)
-DOCKER_IS_ROOTLESS=$(docker info 2> /dev/null | grep 'Context: \+rootless')
-
+DOCKER_IS_ROOTLESS=$(docker info 2> /dev/null | grep 'Context: \+rootless' ||
true)
function lookup_image_spec() {
img_spec=$(python3 "${GIT_TOPLEVEL}/ci/jenkins/data.py" "$1")