Hide email and password in message showing the command ran by the official installer

This commit is contained in:
Alexandre 'Kidev' Poumaroux
2025-03-18 00:48:36 +01:00
parent bb523be201
commit 75e08f10a2

View File

@@ -371,9 +371,14 @@ class CommercialInstaller:
install_cmd = self.package_manager.get_install_command(self.modules, temp_dir) install_cmd = self.package_manager.get_install_command(self.modules, temp_dir)
cmd = [*base_cmd, *install_cmd] cmd = [*base_cmd, *install_cmd]
self.logger.info(f"Running: {cmd}")
safely_run(cmd, Settings.qt_installer_timeout) safely_run(cmd, Settings.qt_installer_timeout)
for i in range(len(cmd) - 1):
if cmd[i] == "--email" or cmd[i] == "--pw":
cmd[i + 1] = "***"
self.logger.info(f"Running: {cmd}")
except Exception as e: except Exception as e:
self.logger.error(f"Installation failed: {str(e)}") self.logger.error(f"Installation failed: {str(e)}")
raise raise