Hi everyone, I''m using a svn pre-commit hook to check manifests for syntax errors. I''ve recently upgraded puppet from 0.22.4 to 0.23.2 and the hook stopped working. I use the following command to parse .pp files: /usr/local/bin/puppet --confdir=/tmp --vardir=/tmp --parseonly --ignoreimport /tmp/$$.pp Now, I make a decision based on the exit code. If 0 then commit, else exit and show the error message. It looks like new puppet always returns 0 regardless if there were syntax errors or not. Is this normal? I''m doing this on FreeBSD 6.1 Cheers, Andrew -- __/_/_ w: http://darq.com/ __/_/_ m: 07971 10 20 88 / / t: 020 7100 1447
On Oct 3, 2007, at 11:32 AM, Andrew Wasilczuk wrote:> Hi everyone, > > I''m using a svn pre-commit hook to check manifests for syntax errors. > I''ve recently upgraded puppet from 0.22.4 to 0.23.2 and the hook > stopped > working. I use the following command to parse .pp files: > > /usr/local/bin/puppet --confdir=/tmp --vardir=/tmp --parseonly -- > ignoreimport /tmp/$$.pp > > Now, I make a decision based on the exit code. If 0 then commit, else > exit and show the error message. It looks like new puppet always > returns 0 regardless if there were syntax errors or not. Is this > normal? I''m doing this on FreeBSD 6.1It certainly shouldn''t be doing that. Are others having this problem? -- It''s not the voting that''s democracy, it''s the counting. -- Tom Stoppard --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Andrew Wasilczuk wrote:> Hi everyone, > > I''m using a svn pre-commit hook to check manifests for syntax errors. > I''ve recently upgraded puppet from 0.22.4 to 0.23.2 and the hook stopped > working. I use the following command to parse .pp files: > > /usr/local/bin/puppet --confdir=/tmp --vardir=/tmp --parseonly --ignoreimport /tmp/$$.pp > > Now, I make a decision based on the exit code. If 0 then commit, else > exit and show the error message. It looks like new puppet always > returns 0 regardless if there were syntax errors or not. Is this > normal? I''m doing this on FreeBSD 6.1 > >Are you using the sysutils/puppet-devel port? I''ll try to get around to testing this today. -- Russell A. Jackson <raj@csub.edu> Network Analyst California State University, Bakersfield If one studies too zealously, one easily loses his pants. -- A. Einstein. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Thursday 04 October 2007 01:58:00 Luke Kanies wrote:> > Now, I make a decision based on the exit code. If 0 then commit, else > > exit and show the error message. It looks like new puppet always > > returns 0 regardless if there were syntax errors or not. Is this > > normal? I''m doing this on FreeBSD 6.1 > > It certainly shouldn''t be doing that. > > Are others having this problem?Yes. The site.pp in this example cotains an invalid line, "sssssssssssssssssss", only.> puppetmasterd -V0.23.2> puppetmasterd --parseonly > echo $?0 then,> puppetmasterd -V0.22.4> puppetmasterd --parseonlySyntax error at ''false'' at /usr/local/etc/puppet/manifests/site.pp:2> echo $?32> ruby --versionruby 1.8.6 (2007-03-13 patchlevel 0) [i386-freebsd6] Currently, puppet-devel FreeBSD port is not patched except ticket #756. -- Tomoyuki Sakurai
On Oct 3, 2007, at 9:42 PM, Tomoyuki Sakurai wrote:> > Yes. > > The site.pp in this example cotains an invalid line, > "sssssssssssssssssss", > only. > >> puppetmasterd -V > 0.23.2 >> puppetmasterd --parseonly >> echo $? > 0Can you make sure this is filed as a bug? I''m pretty sure it''s now fixed, but if it''s filed I can make sure when I do the final sweep before release. Thanks. -- oH for Pete''s sake, use a real filter. ;-) -- Tom Christiansen Look, I refuse to install any filter which looks like it''s more highly evolved than homo sapiens, it will just get embarassing when it starts critiquing the literrary style of my friends mail to me. -- Richard Caley, in comp.lang.perl.misc --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com