Skip to content

Commit

Permalink
fix param parsing order in ResolveRoutine and added an alert
Browse files Browse the repository at this point in the history
  • Loading branch information
catmandx committed Feb 15, 2024
1 parent 7122db0 commit 61ecd9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions core/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func (r *Runner) RunModule(module libs.Module) {
r.RunScripts(module.PreRun)
}

utils.InforF("Running steps for module %v", color.CyanString(module.Name))
// main part
err := r.RunSteps(module.Steps)
if err != nil {
Expand Down
11 changes: 6 additions & 5 deletions core/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,6 @@ func (r *Runner) ResolveRoutine() {
// print some info about the routine
var totalSteps, totalModules int
parameters := make(map[string]string)
for k, v := range r.Params {
parameters[k] = v
}

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

for k, v := range r.Params {
parameters[k] = v
}

var toggleFlags, skippingFlags, ThreadsFlags []string
for key, value := range parameters {
colorKey := color.HiMagentaString(key)
Expand Down Expand Up @@ -369,11 +370,11 @@ func (r *Runner) ResolveRoutine() {
}

if len(toggleFlags) > 0 || len(skippingFlags) > 0 {
utils.InforF("πŸ”˜ Toggleable and Skippable Parameters that being use: %v, %v", strings.Join(toggleFlags, ", "), strings.Join(skippingFlags, ", "))
utils.InforF("πŸ”˜ Toggleable and Skippable Parameters being used: %v, %v", strings.Join(toggleFlags, ", "), strings.Join(skippingFlags, ", "))
if r.Opt.Verbose {
utils.InforF("πŸš€ Speed Control that being use: %v", strings.Join(ThreadsFlags, ", "))
}
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))
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))
}
}

Expand Down

0 comments on commit 61ecd9a

Please sign in to comment.