Skip to content

Commit

Permalink
Don't pause when there are no parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
viega committed Oct 19, 2023
1 parent 70abcca commit 90a3463
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions files/con4m/params.nim
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,17 @@ proc basicConfigureParameters*(state: ConfigState,
componentList: seq[ComponentInfo],
nextPrompt = "Press [enter] to continue."
) =
var shouldPause = false
print("# Configuring Component: " & component.url)
for subcomp in componentList:
for name, param in subcomp.varParams:
state.basicConfigureOneParam(subcomp, param)
shouldPause = true

for name, param in subcomp.attrParams:
state.basicConfigureOneParam(subcomp, param)
shouldPause = true
print("# Finished configuration for " & component.url)
print(nextPrompt)
discard stdin.readLine()
if shouldPause:
print(nextPrompt)
discard stdin.readLine()

0 comments on commit 90a3463

Please sign in to comment.