MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / detectShebang

Function detectShebang

out/cli.cjs:1370–1379  ·  view source on GitHub ↗
(parsed)

Source from the content-addressed store, hash-verified

1368 var isExecutableRegExp = /\.(?:com|exe)$/i;
1369 var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
1370 function detectShebang(parsed) {
1371 parsed.file = resolveCommand(parsed);
1372 const shebang = parsed.file && readShebang(parsed.file);
1373 if (shebang) {
1374 parsed.args.unshift(parsed.file);
1375 parsed.command = shebang;
1376 return resolveCommand(parsed);
1377 }
1378 return parsed.file;
1379 }
1380 function parseNonShell(parsed) {
1381 if (!isWin) {
1382 return parsed;

Callers 1

parseNonShellFunction · 0.85

Calls 2

resolveCommandFunction · 0.85
readShebangFunction · 0.85

Tested by

no test coverage detected