aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-02-14 13:55:21 +0100
committerPatrick Spek <p.spek@tyil.nl>2020-02-14 13:55:21 +0100
commit00de5cf63cda24f6d99763aa97391a67e5295715 (patch)
treebeb48fa4421aa6d95f9249c78f273a28b4ea1d6b
parentd9ef3bc3a47a1a8861dee06015adb77ee3727f8a (diff)
downloadDist::Maker-00de5cf63cda24f6d99763aa97391a67e5295715.tar.gz
Dist::Maker-00de5cf63cda24f6d99763aa97391a67e5295715.tar.bz2
Fix issue with unavailable resources
There will still be a warning shown, but the behaviour for Dist::Maker seems to be correct at least. The warning may require a fix in Rakudo itself, specifically in the Distribution::Resource code.
-rw-r--r--lib/Dist/Maker/Util.rakumod4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Dist/Maker/Util.rakumod b/lib/Dist/Maker/Util.rakumod
index 12c7bde..22b4870 100644
--- a/lib/Dist/Maker/Util.rakumod
+++ b/lib/Dist/Maker/Util.rakumod
@@ -51,8 +51,8 @@ sub dm-template (
return $user-template if $user-template.f;
# Check for Dist::Maker default template
- with (%?RESOURCES{"templates/$name"}.IO) {
- return $_;
+ if (%?RESOURCES{"templates/$name"}.IO.f) {
+ return %?RESOURCES{"templates/$name"}.IO;
}
# Template could not be found