diff options
Diffstat (limited to 'gbp/scripts/pq_rpm.py')
-rwxr-xr-x | gbp/scripts/pq_rpm.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gbp/scripts/pq_rpm.py b/gbp/scripts/pq_rpm.py index 764ccff..3c22ccb 100755 --- a/gbp/scripts/pq_rpm.py +++ b/gbp/scripts/pq_rpm.py @@ -429,6 +429,10 @@ def main(argv): gbp.log.err("%s is not a git repository" % (os.path.abspath('.'))) return 1 + if os.path.abspath('.') != repo.path: + gbp.log.warn("Switching to topdir before running commands") + os.chdir(repo.path) + try: # Create base temporary directory for this run options.tmp_dir = tempfile.mkdtemp(dir=options.tmp_dir, |