Join GitHub today
Ensure git commands are run in the appropriate directory to prevent "fatal: Not a git repository (or any parent up to mount point /srv)" #10532
From my investigations, it is. The linked error message will be triggered any time the console command is executed with an absolute path inside of a directory that does not contain a .git folder.
Note the error message.
Now let's see what happens when we run the command inside of the piwik directory.
Note the existence of .git. Let's run the command again from this directory and see what we get...
No issues -- confirming this issue is the same one outlined in #8771.
Now, to see why this is happening, we open up Piwik\Plugins\TestRunner\Commands\TestRunOnAws.php and add a new line to the getCurrentGitHash() method.
Note the debug statement. Now when we run the console command again.
We can see that
Thus, I'm quite confident that #8771 is resolved by this pull request.