| 4204 | #if EE_PLATFORM == EE_PLATFORM_MACOS || EE_PLATFORM == EE_PLATFORM_LINUX || \ |
| 4205 | EE_PLATFORM == EE_PLATFORM_BSD |
| 4206 | static std::string getDefaultShell() { |
| 4207 | std::string shell = Sys::getEnv( "SHELL" ); |
| 4208 | if ( !shell.empty() ) |
| 4209 | return shell; |
| 4210 | #if EE_PLATFORM == EE_PLATFORM_WIN |
| 4211 | return "cmd"; |
| 4212 | #elif EE_PLATFORM == EE_PLATFORM_MACOS |
| 4213 | return "zsh"; |
| 4214 | #else |
| 4215 | return "bash"; |
| 4216 | #endif |
| 4217 | } |
| 4218 | |
| 4219 | static std::string getShellEnv( const std::string& env, const std::string& defShell = "" ) { |
| 4220 | std::string shell = defShell.empty() ? Sys::which( getDefaultShell() ) : defShell; |