Skip to content

Commit aceed99

Browse files
gmarullnashif
authored andcommitted
doc: extensions: link-roles: hide stderr for git describe
Redirect stderr to DEVNULL when running `git describe --exact-match`. This prevents messages like "fatal: No names found, cannot describe anything." to be shown. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 345ccea commit aceed99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/_extensions/zephyr/link-roles.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
def get_github_rev():
2323
try:
24-
output = subprocess.check_output('git describe --exact-match', shell=True)
24+
output = subprocess.check_output('git describe --exact-match',
25+
shell=True, stderr=subprocess.DEVNULL)
2526
except subprocess.CalledProcessError:
2627
return 'main'
2728

0 commit comments

Comments
 (0)