-
-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static parameter warning #164
Static parameter warning #164
Conversation
Update README.md for Debian stretch release of webhook package
…specified erroneously
log.Printf("unable to locate command: '%s'", h.ExecuteCommand) | ||
|
||
// check if parameters specified in execute-command by mistake | ||
if strings.IndexByte(h.ExecuteCommand, ' ') != -1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way of checking it will log a false alarm for binaries with spaces in their names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, nvm, it will not.
Looks great! If you could add some tests for this feature, I would be more than glad to merge it in! Thanks. |
@adnanh I've added tests for this feature -- let me know if they look fine. Thanks. |
It's not documented anywhere how to use "pass-arguments-to-command" |
@simplenotezy, To answer your question, see the Github example at https://github.com/adnanh/webhook/blob/master/docs/Hook-Examples.md#incoming-github-webhook |
I have added the logic to produce log warning if static command line parameters are specified in 'execute-command' (issue #151):
"execute-command": "/bin/echo test"
will produce:
Let me know if you want me to do it in a different way.