The source of this bug is that knife diff only supports json format for roles/environments, rather than .rb files. It should not be happening for .erb files or files under cookbooks/ in general.
Which files specifically are you having the issue with? Does it still happen after you "gem install knife-essentials"? The problem might go away, since there have been many fixes to this sort of thing (which are coming to a Chef 11.6 near you).
--John
From: Stephen Corbesero <
>
Sent: Friday, July 12, 2013 6:51 AM To: ' ' Subject: [chef] knife diff is failing with a lexical error I just started trying to use knife diff, and it will (very) often fail with an error like the following.
ERROR: Yajl::ParseError: lexical error: invalid char in json text. # this is very hard coded for a (right here) ------^
It appears that something is trying to parse a ruby file as if were json.
It doesn’t happen for every ruby file. I have started doing some specific test cases, and it seems to mostly occur with .rb files that I have created, but not all the ones that I have created. I have also seen it happen on a few .erb files as well.
Has anyone else seen this, and, more importantly, is there a fix or work around?
-- Stephen Corbesero, PAC Synchronoss Technologies, Inc., Bethlehem, PA, USA
|
Archive powered by MHonArc 2.6.16.