MCPcopy Create free account
hub / github.com/SpartanJ/eepp / getDefaultShell

Function getDefaultShell

src/tools/ecode/ecode.cpp:4206–4217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4204#if EE_PLATFORM == EE_PLATFORM_MACOS || EE_PLATFORM == EE_PLATFORM_LINUX || \
4205 EE_PLATFORM == EE_PLATFORM_BSD
4206static 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
4219static std::string getShellEnv( const std::string& env, const std::string& defShell = "" ) {
4220 std::string shell = defShell.empty() ? Sys::which( getDefaultShell() ) : defShell;

Callers 1

getShellEnvFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected