fix: ensure bash scripts are executable out of the box (#11) - #17
Open
raza-khan0108 wants to merge 1 commit into
Open
fix: ensure bash scripts are executable out of the box (#11)#17raza-khan0108 wants to merge 1 commit into
raza-khan0108 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Ensure bash scripts in templates are executable out-of-the-box (#11)
Summary
This PR resolves Issue #11 (
[Bug]: Bash script not executable ootb), where AI agents and developers encountered permission errors such as:When project templates were initialized or extracted, script files often lacked POSIX execute permissions (
+x) out-of-the-box (OOTB). This PR fixes the issue across three distinct layers: git tracking index permissions, GitHub Actions template release packaging, and the Specify CLI runtime post-processing.Key Changes
1. Git Repository Tracking Permissions
Normalized git index file modes from
100644(read/write non-executable) to100755(executable) for all bash scripts inscripts/bash/:scripts/bash/check-prerequisites.shscripts/bash/common.shscripts/bash/create-new-feature.shscripts/bash/setup-plan.shscripts/bash/update-agent-context.sh2. Release Archive Packaging Workflow
Updated
.github/workflows/scripts/create-release-packages.shto guarantee that any downloaded.ziptemplate archive from GitHub Releases has executable permissions pre-configured:build_variant():3. Specify CLI Core (
__init__.py)Enhanced
ensure_executable_scripts()insrc/iac_specify_cli/__init__.py:.shscripts under both.specifyand.speckitproject directories (rather than strictly.specify/scripts).os.name == "nt"),ensure_executable_scripts()now properly registers thechmodstep as skipped in the RichStepTracker. This prevents the progress spinner from hanging or remaining in an incomplete state duringiac-specify initon Windows machines.4. Test Suite Compatibility & Unit Tests
Updated
tests/test_ensure_functions.py:@pytest.mark.skipif(os.name == "nt", ...)decorators to POSIX permission assertion tests that cannot execute natively on Windows NTFS.test_makes_sh_scripts_in_speckit_executable) to verify that scripts inside.speckit/are made executable.test_tracker_reports_updated_countto accept"skipped"status on Windows and"done"on POSIX systems.5. Versioning & Documentation
In accordance with
AGENTS.mdguidelines for changes touching__init__.py:0.0.9to0.0.10inpyproject.toml.## [0.0.10] - 2026-07-07inCHANGELOG.md.Related Issue
Closes #11
Verification & Testing
Git Mode Verification
Verified git index mode updates via
git diff --cached --summary:Automated Unit Tests
Ran the full test suite across Windows and POSIX environments:
$ uv run pytest ======================= 330 passed, 3 skipped in 1.73s ========================Checklist
AGENTS.md.pyproject.tomland documented changes inCHANGELOG.md.