INNER CODE UNIT · Python
get_asar_cmd
ArcSurge/Termius-Pro-zh_CN · lang.py:239
def get_asar_cmd():
"""根据操作系统返回 asar 命令
Windows: asar.cmd
macOS/Linux: asar
"""
return "asar.cmd" if is_windows() else "asar"
def run_command(cmd, shell=False):
"""执行系统命令,失败时退出程序"""
if isinstance(cmd, list):
logging.debug(f"Running command: {' '.join(cmd)}")
else:
logging.debug(f"Running command: {cmd}")
try:
subprocess.run(cmd, shell=shell, check=True)
except subprocess.CalledProcessError as e: