redo-always/redo-ifcreate/redo-stamp: work inside chdir().
If someone cd's to another directory and then runs redo-always, we weren't adding to the right target.
This commit is contained in:
parent
caea093519
commit
e6f95521ae
6 changed files with 26 additions and 7 deletions
|
|
@ -5,12 +5,14 @@ from log import err
|
|||
|
||||
|
||||
try:
|
||||
me = state.File(name=vars.TARGET)
|
||||
me = os.path.join(vars.STARTDIR,
|
||||
os.path.join(vars.PWD, vars.TARGET))
|
||||
f = state.File(name=me)
|
||||
for t in sys.argv[1:]:
|
||||
if os.path.exists(t):
|
||||
err('redo-ifcreate: error: %r already exists\n' % t)
|
||||
sys.exit(1)
|
||||
else:
|
||||
me.add_dep('c', t)
|
||||
f.add_dep('c', t)
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(200)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue