A shell word that is not the program: an environment assignment * (`LC_ALL=C make`) or the `env` that runs the program after them * (`/usr/bin/env make`). */
| 677 | * (`LC_ALL=C make`) or the `env` that runs the program after them |
| 678 | * (`/usr/bin/env make`). */ |
| 679 | static bool spawn_prefix_word(const char *word, size_t len) { |
| 680 | static const char env[] = "env"; |
| 681 | size_t env_len = sizeof(env) - 1; |
| 682 | if (len >= env_len && strncmp(word + len - env_len, env, env_len) == 0 && |
| 683 | (len == env_len || word[len - env_len - 1] == '/')) { |
| 684 | return true; |
| 685 | } |
| 686 | size_t i = 0; |
| 687 | while (i < len && spawn_word_char(word[i])) { |
| 688 | i++; |
| 689 | } |
| 690 | return i > 0 && i < len && word[i] == '='; |
| 691 | } |
| 692 | |
| 693 | /* The program word of a command line: its first word that is not an |
| 694 | * environment prefix, without directories. Anything built at run time is not |
no test coverage detected