summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2016-11-09 10:30:04 +0100
committerKai Koehne <kai.koehne@qt.io>2016-11-10 12:04:56 +0000
commit5fc3be56ea6c1d7b1b7567ce429774e92859dd14 (patch)
treedb7fbbbadd7b14669086dea4f1fd3797ed5895be /tools
parent58467ed1950ee070d0907cbdabb8466aba277305 (diff)
Check if the .git directory exists before invoking git
If .git does not exist then this is not from a git build and therefore there is no reason to invoke git (which might not even exist on the system anyway). This prevents an error appearing due to trying to invoke git on Windows when it does not exist. Change-Id: I8c0b5b237cfdaffdbb33efdd16cf20cd1560f1a1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index a5481e2b9..2fbbb1b42 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -102,7 +102,7 @@ defineReplace(getConfigDir) {
}
defineReplace(getChromiumSrcDir) {
- git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
+ exists($$QTWEBENGINE_ROOT/.git): git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
# Fall back to the snapshot path if git does not know about chromium sources (i.e. init-repository.py has not been used)
isEmpty(git_chromium_src_dir): git_chromium_src_dir = "src/3rdparty/chromium"
return($$git_chromium_src_dir)