From 499f6e2fe5906eaa6be63ff47ef4ae6f19f88b62 Mon Sep 17 00:00:00 2001 From: Audun Sutterud Date: Tue, 17 Jan 2023 15:37:29 +0100 Subject: [PATCH] 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 Reviewed-by: Daniel Smith --- init-repository | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) {