Skip to contentSkip to conversation

externalsrc.bbclass: Suppress git errors

PATCH New Joshua Watt 1 participant 1 message Feb 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 externalsrc.bbclass: Suppress git errors

Suppress any warnings git might generate when searching for a valid git directory, as there are use cases where the directory is expected to not exist and the warning is superfluous

---
 meta/classes/externalsrc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/externalsrc.bbclass +1 -1
index 65dd13ddc1f..ac1b904e72c 100644
@@ -189,7 +189,7 @@ def srctree_hash_files(d, srcdir=None):
 
     try:
         git_dir = os.path.join(s_dir,
-            subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir']).decode("utf-8").rstrip())
+            subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip())
     except subprocess.CalledProcessError:
         pass
 
Signature · 1 line
2.14.3