Commit 5ac97944 by Sébastien Eustace

Fix self:update command

parent 0d9aa17e
......@@ -18,6 +18,7 @@
### Fixed
- Fixed handling of extras when resolving dependencies.
- Fixed `self:update` command for some installation.
## [0.8.6] - 2018-04-30
......
......@@ -29,7 +29,7 @@ class SelfUpdateCommand(Command):
version = '>=' + __version__
repo = PyPiRepository(fallback=False)
packages = repo.find_packages('poetry', version)
packages = repo.find_packages('poetry', version, allow_prereleases=self.option('preview'))
if not packages:
self.line('No release found for the specified version')
return
......@@ -99,7 +99,10 @@ class SelfUpdateCommand(Command):
elif real_prefix:
pip = Path(real_prefix) / 'bin' / 'pip'
else:
raise RuntimeError('Unable to determine poetry\'s path')
pip = Path(prefix) / 'bin' / 'pip'
if not pip.exists():
raise RuntimeError('Unable to determine poetry\'s path')
with temporary_directory(prefix='poetry-update-') as temp_dir:
temp_dir = Path(temp_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment