From d78149dc5a8b208d04fe5edd55b5143f3ec6cce8 Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Mar 04 2020 11:12:25 +0000 Subject: rpmbulid: print human friendly error for nonexisting subdirectory Fixes: #1133 --- diff --git a/rpmbuild/copr_rpmbuild/providers/scm.py b/rpmbuild/copr_rpmbuild/providers/scm.py index 4720b04..203437b 100644 --- a/rpmbuild/copr_rpmbuild/providers/scm.py +++ b/rpmbuild/copr_rpmbuild/providers/scm.py @@ -118,6 +118,9 @@ class ScmProvider(Provider): 'tito_test': self.get_tito_test_command, 'make_srpm': self.get_make_srpm_command, }[self.srpm_build_method]() + if not os.path.exists(self.repo_subpath): + raise RuntimeError("The user-defined SCM subdirectory `{}' doesn't exist within this repository {}" + .format(self.repo_subdir, self.clone_url)) return run_cmd(cmd, cwd=self.repo_subpath) def produce_sources(self):