From cd0c68c1ccbefda807cd7934281d657801b0ae4c Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 3 Mar 2020 15:17:09 -0500 Subject: Stop execution when SHELL is undefined --- src/config_global.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/config_global.c b/src/config_global.c index 4951e6d..16d97cf 100644 --- a/src/config_global.c +++ b/src/config_global.c @@ -135,6 +135,12 @@ void check_runtime_environment(void) { "reloc", NULL, }; + + if (getenv("SHELL") == NULL) { + fprintf(stderr, "Required environment variable 'SHELL' is not defined\n"); + bad_rt = 1; + } + for (int i = 0; required[i] != NULL; i++) { char *result = find_executable(required[i]); if (!result) { -- cgit