From 091c58307d4ac9c14195a2d1d08cba69a5185e33 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 22 Oct 2026 20:36:59 +0200 Subject: [PATCH] fix(install): drop the shfmt docstrings that misstate ensure() Three docstrings from #1173 claimed that ensure() leaves only the pinned release on PATH or replaces whatever version PATH finds. It does neither: it installs the release into /usr/local/bin and fails unless PATH then resolves to it, so a distribution copy such as /usr/bin/shfmt stays on disk behind it. The test module and ensure() lose their docstrings; the module docstring of the installer returns to the form its siblings use ("Install hadolint via GitHub-release prebuilt binary."). Reported by CodeRabbit on #1173. Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/unit/python/utils/install/lint/test_shfmt.py | 2 -- utils/install/lint/shfmt.py | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/unit/python/utils/install/lint/test_shfmt.py b/tests/unit/python/utils/install/lint/test_shfmt.py index f0771d3b89..95b63997a5 100644 --- a/tests/unit/python/utils/install/lint/test_shfmt.py +++ b/tests/unit/python/utils/install/lint/test_shfmt.py @@ -1,5 +1,3 @@ -"""shfmt.ensure leaves only the pinned release on PATH, whatever was there before.""" - from __future__ import annotations import subprocess diff --git a/utils/install/lint/shfmt.py b/utils/install/lint/shfmt.py index d563303474..16038fb137 100644 --- a/utils/install/lint/shfmt.py +++ b/utils/install/lint/shfmt.py @@ -1,4 +1,4 @@ -"""Install the shfmt release roles/sys-lint pins, whatever PATH already holds.""" +"""Install shfmt via GitHub-release prebuilt binary.""" from __future__ import annotations @@ -72,7 +72,6 @@ def _installed_version() -> str | None: def ensure() -> None: - """Install the pinned shfmt release, replacing whatever version PATH finds.""" _slug, want = resolve_release("shfmt") found = _installed_version() if found == want: