From 4badf3b5b18a299b722b70791b918c9e161c1876 Mon Sep 17 00:00:00 2001 From: Ali jawwad <33836051+jawwad-ali@users.noreply.github.com> Date: Tue, 30 Jun 2026 02:56:06 +0500 Subject: [PATCH] fix(scripts): use ASCII [OK] marker in initialize-repo.sh (parity with PowerShell twin) (#3231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(scripts): use ASCII [OK] marker in initialize-repo.sh (parity with PowerShell twin) initialize-repo.sh printed its success line with a Unicode checkmark ('✓ Git repository initialized'), while the PowerShell twin initialize-repo.ps1 and both auto-commit scripts use the ASCII marker '[OK]'. That is an output-text divergence across the bash/PowerShell twins and an inconsistency among sibling extension scripts. Use '[OK]' to match. Co-Authored-By: Claude Opus 4.8 (1M context) * test: assert full [OK] init line and surface stderr on failure Address Copilot review: assert the full success line '[OK] Git repository initialized' (not just the '[OK]' substring, which could pass if unrelated [OK] output is added later) and include result.stderr in the assertion message so a failure is debuggable. Co-Authored-By: Claude Opus 4.8 (1M context) --------- Co-authored-by: Claude Opus 4.8 (1M context) --- extensions/git/scripts/bash/initialize-repo.sh | 2 +- tests/extensions/git/test_git_extension.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/git/scripts/bash/initialize-repo.sh b/extensions/git/scripts/bash/initialize-repo.sh index 296e363b9..c10876efc 100755 --- a/extensions/git/scripts/bash/initialize-repo.sh +++ b/extensions/git/scripts/bash/initialize-repo.sh @@ -51,4 +51,4 @@ _git_out=$(git init -q 2>&1) || { echo "[specify] Error: git init failed: $_git_ _git_out=$(git add . 2>&1) || { echo "[specify] Error: git add failed: $_git_out" >&2; exit 1; } _git_out=$(git commit --allow-empty -q -m "$COMMIT_MSG" 2>&1) || { echo "[specify] Error: git commit failed: $_git_out" >&2; exit 1; } -echo "✓ Git repository initialized" >&2 +echo "[OK] Git repository initialized" >&2 diff --git a/tests/extensions/git/test_git_extension.py b/tests/extensions/git/test_git_extension.py index 1a291f030..2f53854d8 100644 --- a/tests/extensions/git/test_git_extension.py +++ b/tests/extensions/git/test_git_extension.py @@ -233,6 +233,10 @@ class TestInitializeRepoBash: result = _run_bash("initialize-repo.sh", project) assert result.returncode == 0, result.stderr + # Success marker is the full ASCII "[OK] ..." line (matching the PowerShell + # twin and the sibling auto-commit scripts), not a Unicode checkmark. + assert "[OK] Git repository initialized" in result.stderr, result.stderr + # Verify git repo exists assert (project / ".git").exists()