From: Mikko Rasa Date: Fri, 23 Dec 2022 21:25:04 +0000 (+0200) Subject: File Tool's executable before calling do_prepare X-Git-Url: http://git.tdb.fi/?p=builder.git;a=commitdiff_plain;h=d10be3251b2b6605723c6c753a4c9a9ba35c9950 File Tool's executable before calling do_prepare --- diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index 0ec9222..086a1ed 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -105,7 +105,6 @@ string GnuCompiler::create_build_signature(const BuildInfo &binfo) const void GnuCompiler::do_prepare() { - executable = builder.get_vfs().find_binary(command); prepare_syspath(); prepare_version(); } diff --git a/source/tool.cpp b/source/tool.cpp index 402d20d..6e2b214 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(!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)); } }