mirror of
https://github.com/TECHNOFAB11/powerproto.git
synced 2025-12-12 08:00:04 +01:00
fix: do not display warning if post action/shell not used
This commit is contained in:
parent
3613a2039d
commit
7c17403ec5
1 changed files with 10 additions and 1 deletions
|
|
@ -345,8 +345,17 @@ func Compile(ctx context.Context, targets []string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
displayWarn := false
|
||||||
|
for _, configItem := range configItems {
|
||||||
|
if len(configItem.Config().PostActions) > 0 || configItem.Config().PostShell != "" {
|
||||||
|
displayWarn = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if displayWarn {
|
||||||
log.LogWarn(nil, "PostAction and PostShell is skipped. If you need to allow execution, please append '-p' to command flags to enable")
|
log.LogWarn(nil, "PostAction and PostShell is skipped. If you need to allow execution, please append '-p' to command flags to enable")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.LogInfo(nil, "Good job! you are ready to go :)")
|
log.LogInfo(nil, "Good job! you are ready to go :)")
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue