commit:     7ce5e147a7ef3b776cb3910c0c21b999f7e2839b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  1 02:50:13 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 22 15:36:22 2021 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=7ce5e147

ebuild-writing/common-mistakes: add calling external tools without die

Suggested-by: Joonas Niilola <juippis <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
[Internal cross reference fixed]
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ebuild-writing/common-mistakes/text.xml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/ebuild-writing/common-mistakes/text.xml 
b/ebuild-writing/common-mistakes/text.xml
index e0cdd12..4e26462 100644
--- a/ebuild-writing/common-mistakes/text.xml
+++ b/ebuild-writing/common-mistakes/text.xml
@@ -13,6 +13,19 @@ writing ebuilds.
 <section>
 <title>Common Ebuild Writing Mistakes</title>
 
+<subsection>
+<title>Unguarded external calls</title>
+<body>
+
+<p>
+Calls to external tools should be guarded with <c>|| die</c> (or use
+<c>assert</c>) in almost all cases to allow failure to be detected.
+See <uri link="::ebuild-writing/error-handling/"/>.
+</p>
+
+</body>
+</subsection>
+
 <subsection>
 <title>Invalid use of <c>static</c> use-flag</title>
 <body>

Reply via email to