From 2cf88e8088b6c1531080b10d2bfb169e2dc22379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 12 Sep 2024 03:33:30 +0200 Subject: [PATCH] Runs pre-gen command before validating project (#1500) --- Sources/XcodeGenCLI/Commands/GenerateCommand.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift index 385846e5..8ae7ba86 100644 --- a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift +++ b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift @@ -69,6 +69,11 @@ class GenerateCommand: ProjectCommand { } } + // run pre gen command + if let command = project.options.preGenCommand { + try Task.run(bash: command, directory: projectDirectory.absolute().string) + } + // validate project do { try project.validateMinimumXcodeGenVersion(version) @@ -77,11 +82,6 @@ class GenerateCommand: ProjectCommand { throw GenerationError.validationError(error) } - // run pre gen command - if let command = project.options.preGenCommand { - try Task.run(bash: command, directory: projectDirectory.absolute().string) - } - // generate plists info("⚙️ Generating plists...") let fileWriter = FileWriter(project: project)