Skip to content

Commit

Permalink
initialise the process environment only once
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch committed Jul 16, 2024
1 parent a1a8d95 commit 2c0c8e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/project_manager/ros_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ QList<Utils::FilePath> ROSUtils::installedDistributions()

void ROSUtils::sourceWorkspaceHelper(QProcess *process, const QString &path)
{
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QProcessEnvironment env;

if (!path.isEmpty())
{
Expand Down Expand Up @@ -1211,6 +1211,8 @@ QProcessEnvironment ROSUtils::getWorkspaceEnvironment(const WorkspaceInfo &works
{
QProcess process;

// initialise environment
process.setProcessEnvironment(QProcessEnvironment::systemEnvironment());
process.setProcessEnvironment(current_environment.toProcessEnvironment());

sourceWorkspace(&process, workspaceInfo);
Expand Down

0 comments on commit 2c0c8e3

Please sign in to comment.