Commit 071e120e authored by Christian Kandeler's avatar Christian Kandeler
Browse files

RemoteLinux: Only source remote files when they exist.

Change-Id: I644ee25117ebc3fdbd525e6fe62b5541b85dd221
Reviewed-on: http://codereview.qt.nokia.com/4069

Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent 049db19d
......@@ -261,7 +261,13 @@ QString RemoteLinuxRunConfiguration::arguments() const
QString RemoteLinuxRunConfiguration::environmentPreparationCommand() const
{
return QLatin1String("source /etc/profile; source $HOME/.profile");
QString command;
const QStringList filesToSource = QStringList() << QLatin1String("/etc/profile")
<< QLatin1String("$HOME/.profile");
foreach (const QString &filePath, filesToSource)
command += QString::fromLocal8Bit("test -f %1 && source %1;").arg(filePath);
command.chop(1); // Trailing semicolon.
return command;
}
QString RemoteLinuxRunConfiguration::commandPrefix() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment