diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-11-06 03:54:45 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-11-06 03:54:45 +0300 |
commit | 1e829377fe1a252d966f0e97ec7f6dcbbfabaa71 (patch) | |
tree | 1691189f9e11d8dd1ae35dabc1268d3545a90438 | |
parent | abeb75a282ada95f6088cf7aa2a98a3f084a365d (diff) |
Prevent error fatal: Not a git repository (or any parent up to mount point /home) - Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
-rw-r--r-- | plugins/TestRunner/Commands/TestsRunOnAws.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/TestRunner/Commands/TestsRunOnAws.php b/plugins/TestRunner/Commands/TestsRunOnAws.php index c894f80e90..3e99e05a6b 100644 --- a/plugins/TestRunner/Commands/TestsRunOnAws.php +++ b/plugins/TestRunner/Commands/TestsRunOnAws.php @@ -142,6 +142,10 @@ This feature is still beta and there might be problems with pictures and/or bina private function getCurrentGitHash() { + // we should not use 'git' executable unless we are in a git clone + if(!file_exists(PIWIK_INCLUDE_PATH . '/.git/')) { + return 'WARN: it does not look like a Piwik repository clone - you must setup Piwik from git to proceed'; + } return trim(`git rev-parse HEAD`); } |