Webhook: did not find expected hexdecimal number

Created on 14 Feb 2018  路  6Comments  路  Source: adnanh/webhook

On Windows, my hooks.json contains this:

"execute-command": "C:\Users\someuser\somescript.bat",

But the \U is interpreted as a hexadecimal number:

did not find expected hexdecimal number

Even though the \U is uppercase.

Escaping the backslash does not change the error. The workaround is to use forward slashes.

bug

All 6 comments

@macau23 Thanks for bringing this issue up!

@moorereason perhaps we could do path normalization along with a check if the specified command to execute exists for all defined hooks?

The check could spit out warnings, or terminate the process if the webhook is running in the silent mode (in the same way we do when we cannot load hooks file).

Thoughts?

@macau23,
You definitely need to escape the backslashes due to the JSON/YAML string specs. But as you mentioned, the problem remains even with the escaping.

@adnanh,
I should be able to test this on a Windows box today.

@macau23,
I'm unable to reproduce this issue. When I escape the backslashes, the hook works for me. Can you provide us with your hooks configuration and the verbose logs of the error?

@moorereason the escaping is working for me now too. I must have made a mistake, apologies.

Cool, I still think we should add a warning if the command cannot be found at the hooks loading time.

Close?

Was this page helpful?
0 / 5 - 0 ratings