Commit b72efb9
Return early from script mutator if no script is defined (#4711)
## Summary
- Move the empty command check to the top of `script.Apply` so that
`NewCommandExecutor` (which requires a shell to be available) is not
called when no script hook is configured.
- Simplify `executeHook` by passing the resolved command directly
instead of re-fetching it from the bundle.
Found out about this dependency during investigation of #4710.
## Test plan
- [x] Existing unit tests pass
- [x] No new behavior introduced; this is a refactor that reorders
existing checks
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 11d89ff commit b72efb9
1 file changed
+9
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | | - | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 68 | + | |
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
| |||
82 | 79 | | |
83 | 80 | | |
84 | 81 | | |
85 | | - | |
| 82 | + | |
86 | 83 | | |
87 | 84 | | |
88 | 85 | | |
| |||
0 commit comments