aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-03-03 15:17:09 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-03-03 15:17:09 -0500
commitcd0c68c1ccbefda807cd7934281d657801b0ae4c (patch)
tree7677ffad123d065f7dadad53066eee9fd738b180 /src
parente372384275969cc5aa70591d4f8363f0f3ad63ca (diff)
downloadspmc-cd0c68c1ccbefda807cd7934281d657801b0ae4c.tar.gz
Stop execution when SHELL is undefined
Diffstat (limited to 'src')
-rw-r--r--src/config_global.c6
1 files changed, 6 insertions, 0 deletions
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) {