diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-03 15:17:09 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-03 15:17:09 -0500 |
commit | cd0c68c1ccbefda807cd7934281d657801b0ae4c (patch) | |
tree | 7677ffad123d065f7dadad53066eee9fd738b180 /src | |
parent | e372384275969cc5aa70591d4f8363f0f3ad63ca (diff) | |
download | spmc-cd0c68c1ccbefda807cd7934281d657801b0ae4c.tar.gz |
Stop execution when SHELL is undefined
Diffstat (limited to 'src')
-rw-r--r-- | src/config_global.c | 6 |
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) { |