(fd)
| 46 | |
| 47 | const expectedHashBang = Buffer.from('#!/bin/sh\n'); |
| 48 | async function hasInvalidHashBang(fd) { |
| 49 | const { length } = expectedHashBang; |
| 50 | |
| 51 | const actual = Buffer.allocUnsafe(length); |
| 52 | await fd.read(actual, 0, length, 0); |
| 53 | |
| 54 | return Buffer.compare(actual, expectedHashBang); |
| 55 | } |
| 56 | |
| 57 | async function checkFiles(...files) { |
| 58 | const flags = FIX_MODE_ENABLED ? 'r+' : 'r'; |
no test coverage detected
searching dependent graphs…