mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 04:04:15 +02:00
[snap] improvement: allowing the actions output locale to be decided by the Snap client
This commit is contained in:
@@ -18,6 +18,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- General
|
- General
|
||||||
- code refactoring
|
- code refactoring
|
||||||
|
|
||||||
|
- Snap
|
||||||
|
- allowing the actions output locale to be decided by the Snap client
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- Arch
|
- Arch
|
||||||
- regression: not displaying ignored updates
|
- regression: not displaying ignored updates
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ def is_installed() -> bool:
|
|||||||
def uninstall_and_stream(app_name: str, root_password: Optional[str]) -> SimpleProcess:
|
def uninstall_and_stream(app_name: str, root_password: Optional[str]) -> SimpleProcess:
|
||||||
return SimpleProcess(cmd=('snap', 'remove', app_name),
|
return SimpleProcess(cmd=('snap', 'remove', app_name),
|
||||||
root_password=root_password,
|
root_password=root_password,
|
||||||
|
lang=None,
|
||||||
shell=True)
|
shell=True)
|
||||||
|
|
||||||
|
|
||||||
@@ -27,13 +28,14 @@ def install_and_stream(app_name: str, confinement: str, root_password: Optional[
|
|||||||
if channel:
|
if channel:
|
||||||
install_cmd.append(f'--channel={channel}')
|
install_cmd.append(f'--channel={channel}')
|
||||||
|
|
||||||
return SimpleProcess(install_cmd, root_password=root_password, shell=True)
|
return SimpleProcess(install_cmd, root_password=root_password, shell=True, lang=None)
|
||||||
|
|
||||||
|
|
||||||
def downgrade_and_stream(app_name: str, root_password: Optional[str]) -> SimpleProcess:
|
def downgrade_and_stream(app_name: str, root_password: Optional[str]) -> SimpleProcess:
|
||||||
return SimpleProcess(cmd=('snap', 'revert', app_name),
|
return SimpleProcess(cmd=('snap', 'revert', app_name),
|
||||||
root_password=root_password,
|
root_password=root_password,
|
||||||
shell=True)
|
shell=True,
|
||||||
|
lang=None)
|
||||||
|
|
||||||
|
|
||||||
def refresh_and_stream(app_name: str, root_password: Optional[str], channel: Optional[str] = None) -> SimpleProcess:
|
def refresh_and_stream(app_name: str, root_password: Optional[str], channel: Optional[str] = None) -> SimpleProcess:
|
||||||
@@ -44,7 +46,7 @@ def refresh_and_stream(app_name: str, root_password: Optional[str], channel: Opt
|
|||||||
|
|
||||||
return SimpleProcess(cmd=cmd,
|
return SimpleProcess(cmd=cmd,
|
||||||
root_password=root_password,
|
root_password=root_password,
|
||||||
error_phrases={'no updates available'},
|
lang=None,
|
||||||
shell=True)
|
shell=True)
|
||||||
|
|
||||||
|
|
||||||
@@ -54,7 +56,7 @@ def run(cmd: str):
|
|||||||
|
|
||||||
def is_api_available() -> Tuple[bool, str]:
|
def is_api_available() -> Tuple[bool, str]:
|
||||||
output = StringIO()
|
output = StringIO()
|
||||||
for o in SimpleProcess(('snap', 'search')).instance.stdout:
|
for o in SimpleProcess(('snap', 'search'), lang=None).instance.stdout:
|
||||||
if o:
|
if o:
|
||||||
output.write(o.decode())
|
output.write(o.decode())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user