forked from qt-creator/qt-creator
Docker: reset process working directory if it needs a device
Change-Id: Ided00a328279b7b82814dcbb79434063ed7ec5f6 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1436,8 +1436,11 @@ void DockerDevice::runProcess(QtcProcess &process) const
|
||||
const Environment env = process.environment();
|
||||
|
||||
CommandLine cmd{"docker", {"exec"}};
|
||||
if (!workingDir.isEmpty())
|
||||
if (!workingDir.isEmpty()) {
|
||||
cmd.addArgs({"-w", workingDir.path()});
|
||||
if (QTC_GUARD(workingDir.needsDevice())) // warn on local working directory for docker cmd
|
||||
process.setWorkingDirectory(FileUtils::homePath()); // reset working dir for docker exec
|
||||
}
|
||||
if (process.processMode() == ProcessMode::Writer)
|
||||
cmd.addArg("-i");
|
||||
if (env.size() != 0 && hasLocalFileAccess()) {
|
||||
|
Reference in New Issue
Block a user