You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I think is happening is that the "file" variable in the below line has Windows back-slashes. Hence when used as a regex direct (without other processing or escaping) parts will be interpreted as special escape codes & so block the desired functionality. Not sure but would hope there's an easy way in ruby to regex-escape an arbitrary string.
My little one-liner recipe that states chocolatey wget also gets this nasty warning from resource_failure_inspector.rb.
I have seen other exceptions on Windows guests that cause the file-path-parser regex in this resource_failure_inspector.rb file to puke. Generally, it does not appear to be savvy about Windows pathname tokens.
Version:
Chef-Client 12.1.0
Environment:
Windows Server 2012 R2
Scenario:
Execute a chef-solo run & view the chef log
Steps to Reproduce:
Add an resource with a forced error, where the cookbooks are in a subdirectory starting with "p" like "C:\Windows\Temp\packer\cookbooks"
Expected Result:
Get the nice display listing the source code of the resource & its values
Actual Result:
C:/opscode/chef/embedded/apps/chef/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb:66: warning: invalid Unicode Property \p
What I think is happening is that the "file" variable in the below line has Windows back-slashes. Hence when used as a regex direct (without other processing or escaping) parts will be interpreted as special escape codes & so block the desired functionality. Not sure but would hope there's an easy way in ruby to regex-escape an arbitrary string.
https://github.com/chef/chef/blob/master/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb#L66
The text was updated successfully, but these errors were encountered: