@@ -54,6 +54,11 @@ static bool buildSwiftPackages(const std::vector<std::filesystem::path>& swiftPa
54
54
return any_successful;
55
55
}
56
56
57
+ static void installDependencies (const CLIArgs& args) {
58
+ auto structure = scanProjectStructure (args.workingDir );
59
+ installDependencies (structure, args.dryRun );
60
+ }
61
+
57
62
static bool autobuild (const CLIArgs& args) {
58
63
auto structure = scanProjectStructure (args.workingDir );
59
64
auto & xcodeTargets = structure.xcodeTargets ;
@@ -82,7 +87,6 @@ static bool autobuild(const CLIArgs& args) {
82
87
return false ;
83
88
} else if (!xcodeTargets.empty ()) {
84
89
LOG_INFO (" Building Xcode target: {}" , xcodeTargets.front ());
85
- installDependencies (structure, args.dryRun );
86
90
auto buildSucceeded = buildXcodeTarget (xcodeTargets.front (), args.dryRun );
87
91
// If build failed, try to build Swift packages
88
92
if (!buildSucceeded && !swiftPackages.empty ()) {
@@ -113,6 +117,7 @@ static CLIArgs parseCLIArgs(int argc, char** argv) {
113
117
114
118
int main (int argc, char ** argv) {
115
119
auto args = parseCLIArgs (argc, argv);
120
+ installDependencies (args);
116
121
auto success = autobuild (args);
117
122
codeql::Log::flush ();
118
123
if (!success) {
0 commit comments