Use QStringList to avoid false matches against a partial path
Signed-off-by: AMZN-Phil <pconroy@amazon.com>
This commit is contained in:
@@ -25,7 +25,8 @@ namespace O3DE::ProjectManager
|
||||
// Add that path for the command line process so that it will be able to locate
|
||||
// a home-brew installed version of CMake
|
||||
QString pathEnv = qEnvironmentVariable("PATH");
|
||||
if (!pathEnv.contains("/usr/local/bin"))
|
||||
QStringList pathEnvList = pathEnv.split(":");
|
||||
if (!pathEnvList.contains("/usr/local/bin"))
|
||||
{
|
||||
pathEnv += ":/usr/local/bin";
|
||||
qputenv("PATH", pathEnv.toStdString().c_str());
|
||||
|
||||
@@ -37,7 +37,8 @@ namespace O3DE::ProjectManager
|
||||
QDir cmakePath(engineInfo.m_path);
|
||||
cmakePath.cd("cmake/runtime/bin");
|
||||
QString pathEnv = qEnvironmentVariable("Path");
|
||||
if (!pathEnv.contains(cmakePath.path()))
|
||||
QStringList pathEnvList = pathEnv.split(";");
|
||||
if (!pathEnvList.contains(cmakePath.path()))
|
||||
{
|
||||
pathEnv += ";" + cmakePath.path();
|
||||
qputenv("Path", pathEnv.toStdString().c_str());
|
||||
|
||||
Reference in New Issue
Block a user