MCPcopy
hub / github.com/di-sukharev/opencommit / readShebang

Function readShebang

out/cli.cjs:1343–1354  ·  view source on GitHub ↗
(command)

Source from the content-addressed store, hash-verified

1341 var fs7 = require("fs");
1342 var shebangCommand = require_shebang_command();
1343 function readShebang(command) {
1344 const size = 150;
1345 const buffer = Buffer.alloc(size);
1346 let fd;
1347 try {
1348 fd = fs7.openSync(command, "r");
1349 fs7.readSync(fd, buffer, 0, size, 0);
1350 fs7.closeSync(fd);
1351 } catch (e3) {
1352 }
1353 return shebangCommand(buffer.toString());
1354 }
1355 module2.exports = readShebang;
1356 }
1357});

Callers 1

detectShebangFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…