git: 8a3d82105846 - main - devel/oci-cli: fix termui breakage after upgrade
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 05 Sep 2023 20:34:47 UTC
The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/ports/commit/?id=8a3d821058467a8d3e92219e5b1731820660a32b commit 8a3d821058467a8d3e92219e5b1731820660a32b Author: Dave Cottlehuber <dch@FreeBSD.org> AuthorDate: 2023-09-05 20:34:39 +0000 Commit: Dave Cottlehuber <dch@FreeBSD.org> CommitDate: 2023-09-05 20:34:39 +0000 devel/oci-cli: fix termui breakage after upgrade - https://click.palletsprojects.com/en/8.1.x/changes/#version-8-1-0 - https://github.com/oracle/oci-cli/pull/684 - https://github.com/oracle/oci-cli/issues/661 --- ...i__object__storage_objectstorage__cli__extended.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/devel/oci-cli/files/patch-services_object__storage_src_oci__cli__object__storage_objectstorage__cli__extended.py b/devel/oci-cli/files/patch-services_object__storage_src_oci__cli__object__storage_objectstorage__cli__extended.py new file mode 100644 index 000000000000..8f65bae844f7 --- /dev/null +++ b/devel/oci-cli/files/patch-services_object__storage_src_oci__cli__object__storage_objectstorage__cli__extended.py @@ -0,0 +1,19 @@ +--- services/object_storage/src/oci_cli_object_storage/objectstorage_cli_extended.py.orig 2023-06-07 19:09:16 UTC ++++ services/object_storage/src/oci_cli_object_storage/objectstorage_cli_extended.py +@@ -11,6 +11,7 @@ import os.path + import math + import os + import os.path ++import shutil + import stat + import sys + from mimetypes import guess_type +@@ -3079,7 +3080,7 @@ def _get_progress_bar_label(original_label, object_nam + else: + # If the names are too long then we can end up with multiple progress bars since we overflow a single line. To prevent + # this, make sure that the label won't consume more than half the terminal width +- terminal_width = click.termui.get_terminal_size()[0] / 2 ++ terminal_width = shutil.get_terminal_size()[0] / 2 + remaining_width = terminal_width - (len(prefix) + 1) + + if len(object_name) > remaining_width: