Whether a hook body is just a shebang / blank lines (i.e. only ever ours).
(content: string)
| 206 | |
| 207 | /** Whether a hook body is just a shebang / blank lines (i.e. only ever ours). */ |
| 208 | function isEffectivelyEmpty(content: string): boolean { |
| 209 | return content |
| 210 | .split('\n') |
| 211 | .map((l) => l.trim()) |
| 212 | .every((l) => l.length === 0 || l.startsWith('#!')); |
| 213 | } |
| 214 | |
| 215 | function chmodExecutable(file: string): void { |
| 216 | try { |
no test coverage detected