From aa62a52ee399efd870632bbe4162de49ec37af0b Mon Sep 17 00:00:00 2001 From: Douglas RAILLARD Date: Tue, 3 Sep 2019 14:24:08 +0100 Subject: [PATCH] target: Make sure subprocesses of Target.execute() inherit PATH Make sure that the subprocesses of the command that is spawned see the same value of PATH env var, so that the tools installed by devlib are available from scripts that could be started as well. --- devlib/target.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/target.py b/devlib/target.py index d213e97..0cf1543 100644 --- a/devlib/target.py +++ b/devlib/target.py @@ -396,7 +396,7 @@ class Target(object): # Ensure to use deployed command when availables if self.executables_directory: - command = "PATH={}:$PATH && {}".format(self.executables_directory, command) + command = "export PATH={}:$PATH && {}".format(self.executables_directory, command) return self.conn.execute(command, timeout=timeout, check_exit_code=check_exit_code, as_root=as_root,