File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,8 @@ def install
7373 # Install examples
7474 prefix . install "examples"
7575
76- # Create smart wrapper script that:
77- # 1. Works around read-only Cellar issue by using a temp working dir
78- # 2. Uses the persistent var-based venv (no copy needed)
79- # 3. Minimal copying - only what needs to be writable
80- # 4. Resolves input file paths before changing directories
81- ( bin /"mfc" ) . write <<~EOS
76+ # Create smart wrapper script in libexec; bin wrapper will be generated by Homebrew
77+ ( libexec /"mfc" ) . write <<~EOS
8278 #!/usr/bin/env bash
8379 set -euo pipefail
8480
@@ -184,12 +180,15 @@ def _homebrew_is_buildable(self):
184180 exec ./mfc.sh "${ARGS[@]}"
185181 fi
186182 EOS
187- ( bin /"mfc" ) . chmod 0755
183+ ( libexec /"mfc" ) . chmod 0755
184+
185+ # Create a thin exec wrapper in bin that calls the libexec script (audit-friendly)
186+ bin . write_exec_script libexec /"mfc"
188187 end
189188
190189 def post_install
191- # Fix executable permissions (Homebrew sometimes overrides them)
192- ( bin /"mfc" ) . chmod 0755
190+ # Fix executable permissions for libexec wrapper
191+ ( libexec /"mfc" ) . chmod 0755
193192 end
194193
195194 def caveats
You can’t perform that action at this time.
0 commit comments