@@ -1591,27 +1591,8 @@ def _get_install_command(self, installer_path: Path) -> list[str]:
1591
1591
)
1592
1592
return cmd
1593
1593
1594
- def _exec_qt_installer (self , arguments : list [str ], working_dir : str ) -> None :
1595
- """Execute Qt installer with validated arguments."""
1596
- original_cwd = os .getcwd ()
1597
- os .chdir (working_dir )
1598
- try :
1599
- if sys .platform == "win32" :
1600
- os .spawnv (os .P_WAIT , "qt-unified-windows-x64-online.exe" , ["qt-unified-windows-x64-online.exe" ] + arguments )
1601
- else :
1602
- pid = os .fork ()
1603
- if pid == 0 : # Child process
1604
- if self .os_name == "mac" :
1605
- os .execv ("qt-unified-macOS-x64-online.dmg" , ["qt-unified-macOS-x64-online.dmg" ] + arguments )
1606
- elif self .os_name == "linux" :
1607
- os .execv ("qt-unified-linux-x64-online.run" , ["qt-unified-linux-x64-online.run" ] + arguments )
1608
- sys .exit (1 )
1609
- else : # Parent process
1610
- _ , status = os .waitpid (pid , 0 )
1611
- if status != 0 :
1612
- raise RuntimeError (f"Qt installation failed with status { status } " )
1613
- finally :
1614
- os .chdir (original_cwd ) # Restore original working directory
1594
+ def _exec_qt_installer (self , cmd : list [str ], working_dir : str ) -> None :
1595
+ subprocess .run (cmd , shell = False , check = True , cwd = working_dir )
1615
1596
1616
1597
def install (self ) -> None :
1617
1598
if (
@@ -1646,13 +1627,7 @@ def install(self) -> None:
1646
1627
safe_cmd [email_index + 1 ] = "********"
1647
1628
self .logger .info (f"Running: { ' ' .join (safe_cmd )} " )
1648
1629
1649
- target_path = temp_path / self .ALLOWED_INSTALLERS [self .os_name ]
1650
- if installer_path != target_path :
1651
- if target_path .exists ():
1652
- target_path .unlink ()
1653
- os .symlink (installer_path , target_path )
1654
-
1655
- self ._exec_qt_installer (cmd [1 :], temp_dir )
1630
+ self ._exec_qt_installer (cmd , temp_dir )
1656
1631
1657
1632
except subprocess .CalledProcessError as e :
1658
1633
self .logger .error (f"Installation failed with exit code { e .returncode } " )
0 commit comments