Thanks for your reply Matthew.  I changed that line to the following:

        /usr/bin/puppet parser validate  $tmpfile >> /tmp/puppet-val.log 
2>&1

Here is what the log is capturing (problem with the environment?):

--
simran@shinda:/var/tmp/puppet/puppet/manifests$* svn ci -m 'testing' 
nodes.pp*
..snip..
Sending        nodes.pp
Transmitting file data .svn: Commit failed (details follow):
svn: Commit blocked by pre-commit hook (exit code 1) with output:
Puppet syntax error in manifests/nodes.pp

[root@ssfpuppetd01 hooks]#* cat /tmp/puppet-val.log*
Error: Could not intialize global default settings: couldn't find HOME 
environment -- expanding `~/.puppet'
--

Regards,
-J


On Friday, December 14, 2012 2:49:11 AM UTC-8, Matthew Burgess wrote:
>
> On Fri, Dec 14, 2012 at 2:00 AM, Jagga Soorma <[email protected]<javascript:>> 
> wrote: 
>
> > #!/bin/bash 
> > 
> > REPOS="$1" 
> > TXN="$2" 
> > tmpfile=$(mktemp) 
> > export 
> > 
> PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" 
>
> > 
> > for file in $(svnlook changed -t "$TXN" "$REPOS" | awk '/^[^D].*\.pp$/ 
> > {print $2}') 
> > do 
> >         svnlook cat -t $TXN $REPOS $file > $tmpfile 
> >         puppet parser validate  $tmpfile &>/dev/null 
>
> That '&' looks a little odd there.  I think what you probably want is 
>
> puppet parser validate  $tmpfile >/dev/null 2>&1 
>
> However, while debugging your issue, I'd recommend capturing the output: 
>
> puppet parser validate  $tmpfile >/tmp/puppet-validation.log 2>&1 
>
> That should at least give you a hint as to what's going on...hopefully! 
>
> Regards, 
>
> Matt. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/YpOlchBjNg0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to