diff --git a/CHANGELOG.md b/CHANGELOG.md index c3a1d313..da2c6d8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - General - code refactoring +- Snap + - allowing the actions output locale to be decided by the Snap client + ### Fixes - Arch - regression: not displaying ignored updates diff --git a/bauh/gems/snap/snap.py b/bauh/gems/snap/snap.py index 2e2eb5b7..f3d4f2ed 100644 --- a/bauh/gems/snap/snap.py +++ b/bauh/gems/snap/snap.py @@ -14,6 +14,7 @@ def is_installed() -> bool: def uninstall_and_stream(app_name: str, root_password: Optional[str]) -> SimpleProcess: return SimpleProcess(cmd=('snap', 'remove', app_name), root_password=root_password, + lang=None, shell=True) @@ -27,13 +28,14 @@ def install_and_stream(app_name: str, confinement: str, root_password: Optional[ if 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: return SimpleProcess(cmd=('snap', 'revert', app_name), 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: @@ -44,7 +46,7 @@ def refresh_and_stream(app_name: str, root_password: Optional[str], channel: Opt return SimpleProcess(cmd=cmd, root_password=root_password, - error_phrases={'no updates available'}, + lang=None, shell=True) @@ -54,7 +56,7 @@ def run(cmd: str): def is_api_available() -> Tuple[bool, str]: output = StringIO() - for o in SimpleProcess(('snap', 'search')).instance.stdout: + for o in SimpleProcess(('snap', 'search'), lang=None).instance.stdout: if o: output.write(o.decode())