utils: check_app_exists: strip whitespace from binary when searching

It's possible that the binary to be searched for contains whitespace which will
cause the search to fail, so strip any whitespace before looking.

(From OE-Core rev: 9e920abdb0f3dcfd1a94a90461ec1ddfb2729d83)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton authored and Richard Purdie committed 2016-08-25 23:03:45 +01:00
1 parent 8670979d22
commit ba736a3458
1 file changed
+1 -1
+1 -1
View File
@@ -303,7 +303,7 @@ hardlinkdir () {
def check_app_exists(app, d):
app = d.expand(app)
app = d.expand(app).strip()
path = d.getVar('PATH', d, True)
return bool(bb.utils.which(path, app))