mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[gems.appimage] improvement: better TryExec field cleaning + tests fixed
This commit is contained in:
@@ -2,7 +2,7 @@ import os
|
||||
import re
|
||||
from typing import Optional
|
||||
|
||||
RE_DESKTOP_EXEC = re.compile(r'(\w*Exec\s*=(.+)(\n?))')
|
||||
RE_DESKTOP_EXEC = re.compile(r'(\n?\s*\w*Exec\s*=(.+))')
|
||||
RE_MANY_SPACES = re.compile(r'\s+')
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ def replace_desktop_entry_exec_command(desktop_entry: str, appname: str, file_pa
|
||||
for exec_groups in execs:
|
||||
full_match = exec_groups[0]
|
||||
|
||||
if full_match.startswith("TryExec"): # TryExec cause issues in some DE to display the app icon
|
||||
if full_match.strip().startswith("TryExec"): # TryExec cause issues in some DE to display the app icon
|
||||
final_entry = final_entry.replace(full_match, "")
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user