Merge pull request #9 from xwjdsh/master

fix: do not display warning if post action/shell not used
This commit is contained in:
storyicon 2022-03-13 19:59:03 +08:00 committed by GitHub
commit 61809b4a10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,8 +345,17 @@ func Compile(ctx context.Context, targets []string) error {
return err
}
} 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.LogInfo(nil, "Good job! you are ready to go :)")
return nil