fix: 🩹 properly return artefact when requiring/including
This commit is contained in:
parent
4ef870c195
commit
120c420f30
1 changed files with 8 additions and 5 deletions
|
@ -137,14 +137,18 @@ module Comfpile
|
|||
@parent_artefact = require_artefact(stage, target)
|
||||
end
|
||||
|
||||
def include_artefact(stage, target)
|
||||
artefact = require_artefact(stage, target)
|
||||
def include_artefact(stage, target, **opts)
|
||||
artefact = require_artefact(stage, target, **opts)
|
||||
@included_artefacts << artefact
|
||||
|
||||
artefact
|
||||
end
|
||||
|
||||
def require_artefact(stage, target)
|
||||
artefact = reference_artefact(stage, target, required: true)
|
||||
def require_artefact(stage, target, **opts)
|
||||
artefact = reference_artefact(stage, target, required: true, **opts)
|
||||
@required_artefacts << artefact
|
||||
|
||||
artefact
|
||||
end
|
||||
|
||||
def reference_artefact(stage, target, required: false)
|
||||
|
@ -164,7 +168,6 @@ module Comfpile
|
|||
artefact
|
||||
end
|
||||
|
||||
#
|
||||
# Find or create a new artefact
|
||||
#
|
||||
# @param [Symbol] stage The type of item to create.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue