ProjectExplorer: Fix starting a docker project on windows

... by mapping the executable and working directory to the target
device.

Change-Id: I0a220fe9bae980cb279fae776962f23335eac248
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2022-11-16 13:28:39 +01:00
parent be1aa6abed
commit c1edc1e9df
2 changed files with 2 additions and 2 deletions

View File

@@ -392,7 +392,7 @@ Runnable RunConfiguration::runnable() const
Runnable r; Runnable r;
r.command = commandLine(); r.command = commandLine();
if (auto workingDirectoryAspect = aspect<WorkingDirectoryAspect>()) if (auto workingDirectoryAspect = aspect<WorkingDirectoryAspect>())
r.workingDirectory = workingDirectoryAspect->workingDirectory(); r.workingDirectory = workingDirectoryAspect->workingDirectory().onDevice(r.command.executable());
if (auto environmentAspect = aspect<EnvironmentAspect>()) if (auto environmentAspect = aspect<EnvironmentAspect>())
r.environment = environmentAspect->environment(); r.environment = environmentAspect->environment();
if (m_runnableModifier) if (m_runnableModifier)

View File

@@ -621,7 +621,7 @@ FilePath ExecutableAspect::executable() const
: m_executable.filePath(); : m_executable.filePath();
if (const IDevice::ConstPtr dev = executionDevice(m_target, m_selector)) if (const IDevice::ConstPtr dev = executionDevice(m_target, m_selector))
exe = dev->filePath(exe.path()); exe = exe.onDevice(dev->rootPath());
return exe; return exe;
} }