Git submodule init fails

We're getting this error when a build is started by a trigger or through the web interface: 

Command Line:          git submodule init

/usr/libexec/git-core/git-sh-setup: line 194: cd: .git: No such file or directory
Unable to determine absolute path of git directory
 
But when starting the build from FinalBuilder everything works as expected. We're running git clone before this task, so the repository is as it should be.

Are you using a relative path to specify the the location of the repository? If so do not do that :

https://www.finalbuilder.com/forum.aspx?aft=10321

 No, we're using absolute paths

Hi Freddy

So far I am unable to reproduce this. Are you using the Git Generic action to run the ‘git submodule init’ command?

Not sure why Git cannot resolve the path of the repository. I tried to reproduce this by creating a project that uses a trigger to monitor a remote repository, when the build runs the remote repository is cloned to a clean local directory and I then use the Git Generic action to run the submodule init command. All this seems to work fine regardless of whether the build is started by the trigger or manually.

Is there anything else you are doing that I may be missing?

Regards,
Steve