@@ -17,6 +17,7 @@ import (
1717
1818 "github.com/Masterminds/cookoo"
1919 "github.com/Masterminds/cookoo/log"
20+ pkglog "github.com/deis/builder/pkg/log"
2021 "golang.org/x/crypto/ssh"
2122)
2223
@@ -122,6 +123,10 @@ func Receive(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt)
122123
123124 done := plumbCommand (cmd , channel , & errbuff )
124125
126+ pkglog .Debug ("Running %s" , strings .Join (cmd .Args , " " ))
127+ pkglog .Debug ("Working Dir: %s" , cmd .Dir )
128+ pkglog .Debug ("Environment: %s" , strings .Join (cmd .Env , "," ))
129+
125130 if err := cmd .Start (); err != nil {
126131 log .Warnf (c , "Failed git receive immediately: %s %s" , err , errbuff .Bytes ())
127132 return nil , err
@@ -212,7 +217,9 @@ func createRepo(c cookoo.Context, repoPath, gitHome string) (bool, error) {
212217 return true , err
213218 }
214219
215- ioutil .WriteFile (filepath .Join (repoPath , "hooks" , "pre-receive" ), hookByteBuf .Bytes (), 0755 )
220+ writePath := filepath .Join (repoPath , "hooks" , "pre-receive" )
221+ pkglog .Debug ("Writing pre-receive hook to %s" , writePath )
222+ ioutil .WriteFile (writePath , hookByteBuf .Bytes (), 0755 )
216223
217224 return true , nil
218225 } else if err == nil {
0 commit comments