mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target.py: cope with non-root users and with non-standard home directories
This commit is contained in:
parent
996ee82f09
commit
d86d67f49c
@ -948,10 +948,7 @@ class LinuxTarget(Target):
|
||||
|
||||
def _resolve_paths(self):
|
||||
if self.working_directory is None:
|
||||
if self.connected_as_root:
|
||||
self.working_directory = '/root/devlib-target'
|
||||
else:
|
||||
self.working_directory = '/home/{}/devlib-target'.format(self.user)
|
||||
self.working_directory = self.path.join(self.execute("pwd").strip(), 'devlib-target')
|
||||
self._file_transfer_cache = self.path.join(self.working_directory, '.file-cache')
|
||||
if self.executables_directory is None:
|
||||
self.executables_directory = self.path.join(self.working_directory, 'bin')
|
||||
|
Loading…
x
Reference in New Issue
Block a user