]> git.tdb.fi Git - builder.git/commitdiff
File Tool's executable before calling do_prepare
authorMikko Rasa <tdb@tdb.fi>
Fri, 23 Dec 2022 21:25:04 +0000 (23:25 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 23 Dec 2022 21:27:06 +0000 (23:27 +0200)
source/gnucompiler.cpp
source/tool.cpp

index 0ec9222a2d28587f8127f01cbaa1e01008496459..086a1ed4a684984a06f2e8f3af4e761ea552619b 100644 (file)
@@ -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();
 }
index 402d20d0b8722ae09d09e15af9eec27955180cae..6e2b21431fc5d1808fef9fd691ccd83ff1bd3275 100644 (file)
@@ -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));
        }
 }