X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftool.cpp;h=28523f677e57bd697d9b2b85ad39d9bcb9461747;hb=f0c0d720edc01f5faa72bb4ff4bf655445842678;hp=402d20d0b8722ae09d09e15af9eec27955180cae;hpb=1ed833343bc83b83c5f61cbfd74423bbba677a04;p=builder.git diff --git a/source/tool.cpp b/source/tool.cpp index 402d20d..28523f6 100644 --- a/source/tool.cpp +++ b/source/tool.cpp @@ -43,15 +43,13 @@ void Tool::prepare() return; prepared = true; + if(!command.empty()) + executable = builder.get_vfs().find_binary(command); do_prepare(); - if(!executable && !command.empty()) + if(!command.empty() && !executable) { - executable = builder.get_vfs().find_binary(command); - if(!executable) - { - builder.get_logger().log("problems", "Can't find executable %s for %s", command, tag); - problems.push_back(format("Can't find executable %s", command)); - } + builder.get_logger().log("problems", "Can't find executable %s for %s", command, tag); + problems.push_back(format("Can't find executable %s", command)); } }