If redo searched all the way up to /default.do, it would run ./default.do instead.

This only happened if the containing project was buggy, ie. you tried
to build a target that has no .do file available anywhere. However, it
resulted in a confusing outcome for that case, where we'd run the wrong
default.do file with the wrong parameters.

Extended an existing test to catch this mistake.
This commit is contained in:
Avery Pennarun 2019-03-02 02:53:02 -05:00
commit e5a27f04e8
4 changed files with 18 additions and 4 deletions

View file

@ -183,6 +183,8 @@ class _BuildJob(object):
return self._finalize(0)
else:
err('no rule to redo %r\n' % t)
sf.set_failed()
sf.save()
return self._finalize(1)
# There is no good place for us to pre-create a temp file for
# stdout. The target dir might not exist yet, or it might currently