diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index 0b05e13d4b5cc4dafcb1578d1c13115296ebacf5..367c862497867a181e44bb0e4999dae866eb29d0 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -2411,10 +2411,20 @@ bool sbbs_t::init() #endif ); if(comspec==NULL) { -#if defined(__unix__) && defined(_PATH_BSHELL) + errormsg(WHERE, ERR_CHK, +#ifdef __unix__ + "SHELL" +#else + "COMSPEC" +#endif + " environment variable", 0); +#if defined(__unix__) + #if defined(_PATH_BSHELL) comspec = _PATH_BSHELL; + #else + comspec = "/bin/sh"; + #endif #else - errormsg(WHERE, ERR_CHK, "SHELL or COMSPEC environment variable", 0); return(false); #endif }