diff --git a/src/cpl_cli/command/uninstall_service.py b/src/cpl_cli/command/uninstall_service.py index da7ea3ca..8e091766 100644 --- a/src/cpl_cli/command/uninstall_service.py +++ b/src/cpl_cli/command/uninstall_service.py @@ -2,6 +2,7 @@ import json import os import subprocess +from cpl.configuration.configuration_abc import ConfigurationABC from cpl.console.console import Console from cpl.console.foreground_color_enum import ForegroundColorEnum from cpl.environment.application_environment_abc import ApplicationEnvironmentABC @@ -14,18 +15,19 @@ from cpl_cli.configuration.settings_helper import SettingsHelper class UninstallService(CommandABC): - def __init__(self, env: ApplicationEnvironmentABC, build_settings: BuildSettings, + def __init__(self, config: ConfigurationABC, env: ApplicationEnvironmentABC, build_settings: BuildSettings, project_settings: ProjectSettings): """ Service for the CLI command uninstall + :param config: :param env: :param build_settings: :param project_settings: """ CommandABC.__init__(self) + self._config = config self._env = env - self._build_settings = build_settings self._project_settings = project_settings @@ -74,7 +76,7 @@ class UninstallService(CommandABC): ProjectSettings.__name__: SettingsHelper.get_project_settings_dict(self._project_settings), BuildSettings.__name__: SettingsHelper.get_build_settings_dict(self._build_settings) } - with open(os.path.join(self._env.working_directory, 'cpl.json'), 'w') as project_file: + with open(os.path.join(self._env.working_directory, f'{self._config.get_configuration("ProjectName")}.json'), 'w') as project_file: project_file.write(json.dumps(config, indent=2)) project_file.close() diff --git a/src/tests/custom/general/src/general/general.json b/src/tests/custom/general/src/general/general.json index 310203a0..e3ebdf79 100644 --- a/src/tests/custom/general/src/general/general.json +++ b/src/tests/custom/general/src/general/general.json @@ -16,8 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "sh_cpl==2021.4.dev1", - "discord.py==1.7.1" + "sh_cpl==2021.4.dev1" ], "PythonVersion": ">=3.8", "PythonPath": {