From 74edfcbe43becd9f433c72d8564fda960ac05264 Mon Sep 17 00:00:00 2001
From: Douglas RAILLARD <douglas.raillard@arm.com>
Date: Tue, 3 Sep 2019 14:26:13 +0100
Subject: [PATCH] target: Fix quoting of PATH components

Make sure the components of PATH are properly quoted.
---
 devlib/target.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devlib/target.py b/devlib/target.py
index 0cf1543..6c4ea49 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 = "export PATH={}:$PATH && {}".format(self.executables_directory, command)
+            command = "export PATH={}:$PATH && {}".format(quote(self.executables_directory), command)
 
         return self.conn.execute(command, timeout=timeout,
                 check_exit_code=check_exit_code, as_root=as_root,