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>
This commit is contained in:
Audun Sutterud
2023-01-17 15:37:29 +01:00
parent 958f500191
commit 499f6e2fe5

View File

@@ -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) {