redo: only default to 'all' in the toplevel instance of redo.
We already did this in minimal/do, and redo-ifchange already did this, but
plain redo didn't. This made constructs like:
for d in *.x; do
echo "${d%.x}"
done | xargs redo
dangerous, because if there were no matching files, we'd try to 'redo all'.
This commit is contained in:
parent
2260bdd30f
commit
07af5d83f9
3 changed files with 5 additions and 2 deletions
|
|
@ -3,6 +3,8 @@ import sys, os
|
|||
def init(targets):
|
||||
if not os.environ.get('REDO'):
|
||||
# toplevel call to redo
|
||||
if len(targets) == 0:
|
||||
targets.append('all')
|
||||
exenames = [os.path.abspath(sys.argv[0]),
|
||||
os.path.realpath(sys.argv[0])]
|
||||
dirnames = [os.path.dirname(p) for p in exenames]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue