Skip to content

Commit 61ecd9a

Browse files
committed
fix param parsing order in ResolveRoutine and added an alert
1 parent 7122db0 commit 61ecd9a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

core/module.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func (r *Runner) RunModule(module libs.Module) {
4343
r.RunScripts(module.PreRun)
4444
}
4545

46+
utils.InforF("Running steps for module %v", color.CyanString(module.Name))
4647
// main part
4748
err := r.RunSteps(module.Steps)
4849
if err != nil {

core/runner.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,6 @@ func (r *Runner) ResolveRoutine() {
320320
// print some info about the routine
321321
var totalSteps, totalModules int
322322
parameters := make(map[string]string)
323-
for k, v := range r.Params {
324-
parameters[k] = v
325-
}
326323

327324
for _, routine := range r.Routines {
328325
// loop through all modules to get the parameters
@@ -341,6 +338,10 @@ func (r *Runner) ResolveRoutine() {
341338
}
342339
}
343340

341+
for k, v := range r.Params {
342+
parameters[k] = v
343+
}
344+
344345
var toggleFlags, skippingFlags, ThreadsFlags []string
345346
for key, value := range parameters {
346347
colorKey := color.HiMagentaString(key)
@@ -369,11 +370,11 @@ func (r *Runner) ResolveRoutine() {
369370
}
370371

371372
if len(toggleFlags) > 0 || len(skippingFlags) > 0 {
372-
utils.InforF("🔘 Toggleable and Skippable Parameters that being use: %v, %v", strings.Join(toggleFlags, ", "), strings.Join(skippingFlags, ", "))
373+
utils.InforF("🔘 Toggleable and Skippable Parameters being used: %v, %v", strings.Join(toggleFlags, ", "), strings.Join(skippingFlags, ", "))
373374
if r.Opt.Verbose {
374375
utils.InforF("🚀 Speed Control that being use: %v", strings.Join(ThreadsFlags, ", "))
375376
}
376-
utils.InforF("💡 You can skip/enable some parater to speed up the scan or get more result. See more with the usage %v", color.HiBlueString("osmedeus workflow view -v -f %v", r.RoutineName))
377+
utils.InforF("💡 You can skip/enable some parameter to speed up the scan or get more result. See more with the usage %v", color.HiBlueString("osmedeus workflow view -v -f %v", r.RoutineName))
377378
}
378379
}
379380

0 commit comments

Comments
 (0)