redo-ifcreate: barf if the file already exists.

I'm pretty sure this must be the intended behaviour.  It's kind of
meaningless to use this to declare a dependency on a file that might start
to exist later, if the file already exists.
This commit is contained in:
Avery Pennarun 2010-11-13 01:22:11 -08:00
commit 5417d0165a
2 changed files with 3 additions and 1 deletions

View file

@ -11,6 +11,7 @@ if not vars.TARGET:
for t in sys.argv[1:]:
mkdirp('%s/.redo' % vars.BASE)
if os.path.exists(t):
add_dep(vars.TARGET, 'm', t)
err('redo-ifcreate: error: %r already exists\n' % t)
sys.exit(1)
else:
add_dep(vars.TARGET, 'c', t)