forked from qt-creator/qt-creator
Utils: Add combine with device env option
Adds the option Environment::combineWithDeviceEnvironment. This allows the linuxdevice to set it to false. Without this option a deadlock would occur when the QtcProcess tries to get the device environment and the device shell failed to start. (e.g. because a required command is missing on the device). Change-Id: I8f7550d0d90e989a339f27e993a836e67e910e33 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -670,11 +670,11 @@ public:
|
||||
Environment fullEnvironment() const
|
||||
{
|
||||
Environment env = m_setup.m_environment;
|
||||
if (!env.hasChanges()) {
|
||||
// FIXME: Either switch to using EnvironmentChange instead of full Environments, or
|
||||
// feed the full environment into the QtcProcess instead of fixing it up here.
|
||||
// qWarning("QtcProcess::start: Empty environment set when running '%s'.",
|
||||
// qPrintable(m_setup.m_commandLine.executable().toString()));
|
||||
if (!env.hasChanges() && env.combineWithDeviceEnvironment()) {
|
||||
// FIXME: Either switch to using EnvironmentChange instead of full Environments, or
|
||||
// feed the full environment into the QtcProcess instead of fixing it up here.
|
||||
// qWarning("QtcProcess::start: Empty environment set when running '%s'.",
|
||||
// qPrintable(m_setup.m_commandLine.executable().toString()));
|
||||
env = m_setup.m_commandLine.executable().deviceEnvironment();
|
||||
}
|
||||
// TODO: needs SshSettings
|
||||
|
||||
Reference in New Issue
Block a user