Commit 5ac97944 by Sébastien Eustace

Fix self:update command

parent 0d9aa17e
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
### Fixed ### Fixed
- Fixed handling of extras when resolving dependencies. - Fixed handling of extras when resolving dependencies.
- Fixed `self:update` command for some installation.
## [0.8.6] - 2018-04-30 ## [0.8.6] - 2018-04-30
......
...@@ -29,7 +29,7 @@ class SelfUpdateCommand(Command): ...@@ -29,7 +29,7 @@ class SelfUpdateCommand(Command):
version = '>=' + __version__ version = '>=' + __version__
repo = PyPiRepository(fallback=False) repo = PyPiRepository(fallback=False)
packages = repo.find_packages('poetry', version) packages = repo.find_packages('poetry', version, allow_prereleases=self.option('preview'))
if not packages: if not packages:
self.line('No release found for the specified version') self.line('No release found for the specified version')
return return
...@@ -99,6 +99,9 @@ class SelfUpdateCommand(Command): ...@@ -99,6 +99,9 @@ class SelfUpdateCommand(Command):
elif real_prefix: elif real_prefix:
pip = Path(real_prefix) / 'bin' / 'pip' pip = Path(real_prefix) / 'bin' / 'pip'
else: else:
pip = Path(prefix) / 'bin' / 'pip'
if not pip.exists():
raise RuntimeError('Unable to determine poetry\'s path') raise RuntimeError('Unable to determine poetry\'s path')
with temporary_directory(prefix='poetry-update-') as temp_dir: with temporary_directory(prefix='poetry-update-') as 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