Lines Matching defs:shebang
390 // shebang line, if any. Length can be -1 if the string is null
418 // the environment, rather than the command line or a shebang line, and the
714 debug(L"# Failed to decode shebang line (0x%08X)\n", GetLastError());
724 debug(L"# Failed to decode shebang line (0x%08X)\n", GetLastError());
756 searchPath(SearchInfo *search, const wchar_t *shebang, int shebangLength)
764 if (!_shebangStartsWith(shebang, shebangLength, L"/usr/bin/env ", &command, &commandLength)) {
817 // If we are, pretend there was no shebang and let normal handling take over
820 debug(L"# ignoring recursive shebang command\n");
895 _useShebangAsExecutable(SearchInfo *search, const wchar_t *shebang, int shebangLength)
904 if (!shebang || !shebangLength) {
910 wchar_t c = shebang[i];
943 search->executableArgs = &shebang[commandLength];
953 // Do not check shebang if a tag was provided or if no script file
976 debug(L"# Failed to open %s for shebang parsing (0x%08X)\n",
985 debug(L"# Failed to read %s for shebang parsing (0x%08X)\n",
992 debug(L"# Read %d bytes from %s to find shebang line\n", bytesRead, scriptFile);
1005 debug(L"# Invalid BOM in shebang line");
1010 // No shebang (#!) at start of line
1011 debug(L"# No valid shebang line");
1019 wchar_t *shebang;
1023 int exitCode = _decodeShebang(search, start, (int)(b - start + (bytesRead == 0)), onlyUtf8, &shebang, &shebangLength);
1027 debug(L"Shebang: %s\n", shebang);
1030 exitCode = searchPath(search, shebang, shebangLength);
1051 if (_shebangStartsWith(shebang, shebangLength, *tmpl, &command, &commandLength)) {
1057 debug(L"# Treating shebang command '%.*s' as %s\n",
1084 debug(L"# Treating shebang command '%.*s' as 'py -%.*s'\n",
1087 debug(L"# Treating shebang command '%.*s' as 'py'\n",
1096 while (commandLength < shebangLength && !isspace(shebang[commandLength])) {
1099 if (_findCommand(search, shebang, commandLength)) {
1100 search->executableArgs = &shebang[commandLength];
1102 debug(L"# Treating shebang command '%.*s' as %s\n",
1103 commandLength, shebang, search->executablePath);
1109 return _useShebangAsExecutable(search, shebang, shebangLength);
2545 // Check for a shebang line in our script file
2557 // Resolve old-style tags (possibly from a shebang) against py.ini entries