Skip to content

Commit

Permalink
new nimu
Browse files Browse the repository at this point in the history
  • Loading branch information
viega committed Oct 19, 2023
1 parent 3500c6a commit 8165856
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion con4m.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ installExt = @["nim", "c4m", "c42spec", "sh"]

# Dependencies
requires "nim >= 2.0.0"
requires "https://github.com/crashappsec/nimutils#1d53532c568acfb2696aa0ac0b99c2bfaeb1c64d"
requires "https://github.com/crashappsec/nimutils#baaa6c133f7e5386665a3344c4c16dcf88951298"


#before build:
Expand Down
12 changes: 9 additions & 3 deletions files/con4m/components.nim
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,17 @@ proc haveComponentFromUrl*(s: ConfigState, url: string): Option[ComponentInfo] =
if base.joinPath(module) notin s.components:
return none(ComponentInfo)

let
component = s.fetchComponent(module, base, ext, force = false)
let component = s.getComponentReference(module, base)


if component.source != "":
return some(component)
result = some(component)
else:
echo ">>", component.source, "<<"
result = none(ComponentInfo)

component.fetchComponent(ext, force = false)


proc loadCurrentComponent*(s: ConfigState) =
s.loadComponent(s.currentComponent)
Expand Down

0 comments on commit 8165856

Please sign in to comment.