Skip to content

Commit 5fc3be5

Browse files
AndyShawQtkkoehne
authored andcommitted
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 <[email protected]>
1 parent 58467ed commit 5fc3be5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/qmake/mkspecs/features/functions.prf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ defineReplace(getConfigDir) {
102102
}
103103

104104
defineReplace(getChromiumSrcDir) {
105-
git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
105+
exists($$QTWEBENGINE_ROOT/.git): git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
106106
# Fall back to the snapshot path if git does not know about chromium sources (i.e. init-repository.py has not been used)
107107
isEmpty(git_chromium_src_dir): git_chromium_src_dir = "src/3rdparty/chromium"
108108
return($$git_chromium_src_dir)

0 commit comments

Comments
 (0)