Skip to content

Commit

Permalink
Avoid infinite recursion with NoPackagesFound and update --all --file
Browse files Browse the repository at this point in the history
Fixes an issue raised on conda#1562.
  • Loading branch information
asmeurer committed Sep 16, 2015
1 parent 1b100cd commit 398286e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion conda/cli/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,14 @@ def install(args, parser, command='install'):
# Not sure what to do here
pass
args._skip = getattr(args, '_skip', ['anaconda'])
args._skip.extend([i.split()[0] for i in e.pkgs])
for pkg in e.pkgs:
p = pkg.split()[0]
if p in args._skip:
# Avoid infinite recursion. This can happen if a spec
# comes from elsewhere, like --file
raise
args._skip.append(p)

return install(args, parser, command=command)
else:
packages = {index[fn]['name'] for fn in index}
Expand Down

0 comments on commit 398286e

Please sign in to comment.