From 241afb5d3ce4c24e886d96cef4174cc361b24ff6 Mon Sep 17 00:00:00 2001 From: Ryan Pessa Date: Mon, 18 Apr 2016 15:22:15 -0500 Subject: [PATCH] fix sh.which usage when executable does not exist --- toolchain.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolchain.py b/toolchain.py index b2a3aa7..cf26651 100755 --- a/toolchain.py +++ b/toolchain.py @@ -144,9 +144,10 @@ class Arch(object): for d in self.ctx.include_dirs] env = {} - ccache = sh.which('ccache').strip() + ccache = sh.which('ccache') cc = sh.xcrun("-find", "-sdk", self.sdk, "clang").strip() if ccache: + ccache = ccache.strip() use_ccache = environ.get("USE_CCACHE", "1") if use_ccache != '1': env["CC"] = cc