eclass/cargo: Don't fail on missing directory
authorEspen Henriksen <dev@henriksen.is>
Tue, 28 Mar 2017 17:55:54 +0000 (19:55 +0200)
committerDoug Goldstein <cardoe@gentoo.org>
Wed, 29 Mar 2017 14:25:14 +0000 (09:25 -0500)
Previously the cargo_src_install step fails when using
`cargo_src_install || die` and no man-directory is
included with the crate. This commit corrects this
behavior and ensures it does not die in those cases.

Package-Manager: Portage-2.3.3

eclass/cargo.eclass

index dae18a866bdd8e3edc4a29e589dabe28ecaf2673..32d04a2d559bf9a3f2514b8884935f9df09b0259 100644 (file)
@@ -125,7 +125,7 @@ cargo_src_install() {
                || die "cargo install failed"
        rm -f "${D}/usr/.crates.toml"
 
-       [ -d "${S}/man" ] && doman "${S}/man"
+       [ -d "${S}/man" ] && doman "${S}/man" || return 0
 }
 
 fi