2021.4 #19
@ -194,7 +194,7 @@ class Configuration(ConfigurationABC):
|
|||||||
if alias in argument:
|
if alias in argument:
|
||||||
found = True
|
found = True
|
||||||
|
|
||||||
if argument_type.name not in argument_name and not found:
|
if argument_type.name not in argument and not found:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if (next_arguments is None or len(next_arguments) == 0) and \
|
if (next_arguments is None or len(next_arguments) == 0) and \
|
||||||
|
@ -126,28 +126,28 @@ class InstallService(CommandABC):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if not is_already_in_project:
|
if not is_already_in_project:
|
||||||
new_package = Pip.get_package(package)
|
new_name = package
|
||||||
if new_package is not None:
|
if '==' in new_package:
|
||||||
if '==' in package:
|
new_name = new_package
|
||||||
new_package = package
|
elif '==' in name:
|
||||||
else:
|
new_name = name
|
||||||
new_package = name
|
|
||||||
|
|
||||||
if '/' in new_package:
|
if '/' in new_name:
|
||||||
new_package = new_package.split('/')[0]
|
new_name = new_name.split('/')[0]
|
||||||
|
|
||||||
if '\r' in new_package:
|
if '\r' in new_name:
|
||||||
new_package = new_package.replace('\r', '')
|
new_name = new_name.replace('\r', '')
|
||||||
|
|
||||||
self._project_settings.dependencies.append(new_package)
|
self._project_settings.dependencies.append(new_name)
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
ProjectSettings.__name__: SettingsHelper.get_project_settings_dict(self._project_settings),
|
ProjectSettings.__name__: SettingsHelper.get_project_settings_dict(self._project_settings),
|
||||||
BuildSettings.__name__: SettingsHelper.get_build_settings_dict(self._build_settings)
|
BuildSettings.__name__: SettingsHelper.get_build_settings_dict(self._build_settings)
|
||||||
}
|
}
|
||||||
with open(os.path.join(self._runtime.working_directory, 'cpl.json'), 'w') as project_file:
|
|
||||||
project_file.write(json.dumps(config, indent=2))
|
#with open(os.path.join(self._runtime.working_directory, 'cpl.json'), 'w') as project_file:
|
||||||
project_file.close()
|
# project_file.write(json.dumps(config, indent=2))
|
||||||
|
# project_file.close()
|
||||||
|
|
||||||
Pip.reset_executable()
|
Pip.reset_executable()
|
||||||
|
|
||||||
|
@ -66,8 +66,7 @@ class Startup(StartupABC):
|
|||||||
]))
|
]))
|
||||||
self._configuration.add_console_argument(ConsoleArgument('', 'publish', ['p', 'P'], ''))
|
self._configuration.add_console_argument(ConsoleArgument('', 'publish', ['p', 'P'], ''))
|
||||||
self._configuration.add_console_argument(ConsoleArgument('', 'start', ['s', 'S'], ''))
|
self._configuration.add_console_argument(ConsoleArgument('', 'start', ['s', 'S'], ''))
|
||||||
self._configuration.add_console_argument(
|
self._configuration.add_console_argument(ConsoleArgument('', 'uninstall', ['ui', 'UI'], ' '))
|
||||||
ConsoleArgument('', 'uninstall', ['ui', 'UI'], ' ', is_value_token_optional=True))
|
|
||||||
self._configuration.add_console_argument(ConsoleArgument('', 'update', ['u', 'U'], ''))
|
self._configuration.add_console_argument(ConsoleArgument('', 'update', ['u', 'U'], ''))
|
||||||
self._configuration.add_console_argument(ConsoleArgument('', 'version', ['v', 'V'], ''))
|
self._configuration.add_console_argument(ConsoleArgument('', 'version', ['v', 'V'], ''))
|
||||||
self._configuration.add_console_arguments(error=False)
|
self._configuration.add_console_arguments(error=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user