Agent skill
manual-patching
Install this agent skill to your Project
npx add-skill https://github.com/BA-CalderonMorales/terminal-jarvis/tree/main/.github/skills/manual-patching
SKILL.md
Manual Patching Guide: Homebrew Tap Fix
Objective: Fix the update-formula.sh script in BA-CalderonMorales/homebrew-terminal-jarvis to prevent deployment failures.
Context
The current script prematurely deletes a temporary file when version numbers match but content differs, causing a "No such file or directory" error during the update process.
The Patch
Target File
scripts/update-formula.sh
Logic Change
Move the deletion of the temporary file (rm "$TEMP_FORMULA") inside the specific block where we exit early, ensuring it remains available if an update is needed.
Code Diff
# Check if update is needed
if [ "$CURRENT_VERSION" = "$NEW_VERSION" ]; then
echo "Formula is already up to date (v$NEW_VERSION)"
- rm "$TEMP_FORMULA"
# Still verify the content matches exactly
if diff -q "$FORMULA_FILE" "$TEMP_FORMULA" > /dev/null 2>&1; then
echo "Formula content is identical"
+ rm "$TEMP_FORMULA"
exit 0
else
echo "Formula versions match but content differs, updating..."
fi
fi
Execution Instructions for Agent
-
Clone the Repository:
bashgit clone https://github.com/BA-CalderonMorales/homebrew-terminal-jarvis.git cd homebrew-terminal-jarvis git checkout develop -
Apply the Fix: Open
scripts/update-formula.shand locate the version check block (around line 53).- Remove
rm "$TEMP_FORMULA"from before theif diffcheck. - Add
rm "$TEMP_FORMULA"inside theif diffsuccess block (beforeexit 0).
- Remove
-
Verify: Ensure the file is NOT deleted if
difffinds differences (theelseblock). -
Commit and Push:
bashgit add scripts/update-formula.sh git commit -m "fix(script): prevent premature deletion of temporary formula file during update check" git push origin develop
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
versioning
release
multi-repo
tool-config
testing
token-budget
Didn't find tool you were looking for?