aboutsummaryrefslogtreecommitdiffstats
path: root/init-repository
diff options
context:
space:
mode:
authorAudun Sutterud <audun.sutterud@qt.io>2023-01-17 15:37:29 +0100
committerAudun Sutterud <audun.sutterud@qt.io>2023-01-26 13:26:02 +0100
commit499f6e2fe5906eaa6be63ff47ef4ae6f19f88b62 (patch)
tree934416ea215d15ac8154eb3b1ea46d975ce0501c /init-repository
parent958f50019196c2664975450a5a8e887ad391a034 (diff)
Warn on absent qtrepotools
When qtrepotools is absent from --module-subset, Git hooks cannot be installed. Emit a warning in this case. Change-Id: I7c53b8c2817f72dbdc2b813dd18c8f63061a00c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Diffstat (limited to 'init-repository')
-rwxr-xr-xinit-repository5
1 files changed, 4 insertions, 1 deletions
diff --git a/init-repository b/init-repository
index fe115e2d..e9372155 100755
--- a/init-repository
+++ b/init-repository
@@ -630,7 +630,10 @@ sub git_install_hooks
my ($self) = @_;
my $hooks = $script_path.'/qtrepotools/git-hooks';
- return if (!-d $hooks);
+ if (!-d $hooks) {
+ print "Warning: cannot find Git hooks, qtrepotools module might be absent\n";
+ return;
+ };
my @configresult = qx(git config --list --local);
foreach my $line (@configresult) {