mirror of
https://github.com/TECHNOFAB11/powerproto.git
synced 2025-12-11 23:50:04 +01:00
Merge pull request #9 from xwjdsh/master
fix: do not display warning if post action/shell not used
This commit is contained in:
commit
61809b4a10
1 changed files with 10 additions and 1 deletions
|
|
@ -345,7 +345,16 @@ func Compile(ctx context.Context, targets []string) error {
|
|||
return err
|
||||
}
|
||||
} else {
|
||||
log.LogWarn(nil, "PostAction and PostShell is skipped. If you need to allow execution, please append '-p' to command flags to enable")
|
||||
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.LogInfo(nil, "Good job! you are ready to go :)")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue