| 516 | } |
| 517 | |
| 518 | static void cli_activation_restore_env(char *home, char *cache) { |
| 519 | if (home) { |
| 520 | cbm_setenv("HOME", home, 1); |
| 521 | } else { |
| 522 | cbm_unsetenv("HOME"); |
| 523 | } |
| 524 | if (cache) { |
| 525 | cbm_setenv("CBM_CACHE_DIR", cache, 1); |
| 526 | } else { |
| 527 | cbm_unsetenv("CBM_CACHE_DIR"); |
| 528 | } |
| 529 | free(home); |
| 530 | free(cache); |
| 531 | } |
| 532 | |
| 533 | /* Helper: create tar.gz with a single file */ |
| 534 | static unsigned char *create_test_targz(const char *filename, const unsigned char *content, |
no test coverage detected