mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 18:16:31 +03:00
Use a login shell to extract the PATH.
This commit is contained in:
@@ -3355,7 +3355,7 @@ static std::string getDefaultShell() {
|
||||
static std::string getShellEnv( const std::string& env, const std::string& defShell = "" ) {
|
||||
std::string shell = defShell.empty() ? Sys::which( getDefaultShell() ) : defShell;
|
||||
Process process;
|
||||
if ( process.create( shell, "-c env", Process::getDefaultOptions() ) ) {
|
||||
if ( process.create( shell, "-l -c env", Process::getDefaultOptions() ) ) {
|
||||
size_t envLen = env.size();
|
||||
std::string buf( 32 * 1024, '\0' );
|
||||
process.readAllStdOut( buf );
|
||||
|
||||
Reference in New Issue
Block a user