Skip to content

Commit 34ef2bd

Browse files
committed
fix: Implement qodo-merge-pro safety improvements
Addressed two suggestions from qodo-merge-pro review: 1. **Add explicit error handling to wrapper** (Importance: 2) - Changed: cd "#{prefix}" && exec - To: cd "#{prefix}" || exit 1; exec - Ensures script fails fast if directory change fails - Prevents execution in wrong directory if prefix is missing 2. **Use lighter test command** (Importance: 7) - Changed: mfc run (full simulation) - To: mfc count (case file parsing only) - Much faster test execution - More reliable (doesn't depend on simulation completing) - Still validates: wrapper, toolchain, case parsing, Python env - Reduces test time from minutes to seconds Both changes improve robustness and testing efficiency.
1 parent 62310af commit 34ef2bd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packaging/homebrew/mfc.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def install
4848
(bin/"mfc").write <<~EOS
4949
#!/bin/bash
5050
export BOOST_INCLUDE="#{Formula["boost"].opt_include}"
51-
cd "#{prefix}" && exec "#{libexec}/mfc.sh" "$@"
51+
cd "#{prefix}" || exit 1
52+
exec "#{libexec}/mfc.sh" "$@"
5253
EOS
5354
chmod 0755, bin/"mfc"
5455
end
@@ -88,8 +89,8 @@ def caveats
8889
assert_predicate libexec/"mfc.sh", :exist?
8990
assert_predicate prefix/"toolchain", :exist?
9091

91-
# Test running a simple example case to verify full toolchain
92-
system bin/"mfc", "run", "#{pkgshare}/examples/1D_sodshocktube/case.py"
92+
# Test that mfc can parse a case file (lighter than full simulation)
93+
system bin/"mfc", "count", "#{pkgshare}/examples/1D_sodshocktube/case.py"
9394
end
9495
end
9596

0 commit comments

Comments
 (0)