| 1703 | } |
| 1704 | |
| 1705 | static int gitenv_spawn_probe(bool strip) { |
| 1706 | char script[2048]; |
| 1707 | gitenv_probe_script(script, sizeof(script)); |
| 1708 | const char *argv[] = {"/bin/sh", "-c", script, NULL}; |
| 1709 | cbm_proc_opts_t opts = {.bin = "/bin/sh", .argv = argv, .strip_git_repo_env = strip}; |
| 1710 | cbm_proc_result_t r; |
| 1711 | if (cbm_subprocess_run(&opts, &r) != 0) { |
| 1712 | return -1; |
| 1713 | } |
| 1714 | return r.exit_code; |
| 1715 | } |
| 1716 | #endif |
| 1717 | |
| 1718 | TEST(subprocess_strip_git_repo_env_is_per_child) { |
no test coverage detected