Bugfixes in install command
This commit is contained in:
parent
f35f5167f0
commit
a12a54f671
@ -65,7 +65,10 @@ class Pip:
|
|||||||
if 'version' in atr:
|
if 'version' in atr:
|
||||||
new_version = atr.split(': ')[1]
|
new_version = atr.split(': ')[1]
|
||||||
|
|
||||||
return f'{package}=={new_version}'
|
if new_version != '':
|
||||||
|
return f'{package}=={new_version}'
|
||||||
|
|
||||||
|
return package
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_outdated(cls) -> bytes:
|
def get_outdated(cls) -> bytes:
|
||||||
|
@ -127,9 +127,15 @@ class InstallService(CommandABC):
|
|||||||
|
|
||||||
if not is_already_in_project:
|
if not is_already_in_project:
|
||||||
new_package = Pip.get_package(package)
|
new_package = Pip.get_package(package)
|
||||||
if new_package is None:
|
if new_package is not None:
|
||||||
new_package = package
|
new_package = package
|
||||||
|
|
||||||
|
if '/' in new_package:
|
||||||
|
new_package = new_package.split('/')[0]
|
||||||
|
|
||||||
|
if '\\' in new_package:
|
||||||
|
new_package = new_package.split('\\')[0]
|
||||||
|
|
||||||
self._project_settings.dependencies.append(new_package)
|
self._project_settings.dependencies.append(new_package)
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
Loading…
Reference in New Issue
Block a user