Skip to content

Commit

Permalink
Don't copy regression output files if the dest matches the source
Browse files Browse the repository at this point in the history
It happens e.g. running 'pgxn check .' in a distribution dir.
  • Loading branch information
dvarrazzo committed May 8, 2011
1 parent 59127e3 commit d707688
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pgxnclient/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ def _inun(self, pdir):
for ext in ('out', 'diffs'):
fn = os.path.join(pdir, 'regression.' + ext)
if os.path.exists(fn):
logger.info(_('copying regression.%s'), ext)
shutil.copy(fn, './regression.' + ext)
dest = './regression.' + ext
if not os.path.exists(dest) or not os.path.samefile(fn, dest):
logger.info(_('copying regression.%s'), ext)
shutil.copy(fn, dest)
raise


Expand Down

0 comments on commit d707688

Please sign in to comment.