feat: Updates 'extraArgs' naming to 'extraOptions' as it's more inline with the usage of them

This commit is contained in:
2024-12-12 18:21:13 -05:00
parent bd56660683
commit ba1e61d99e
7 changed files with 43 additions and 22 deletions

View File

@@ -25,16 +25,24 @@ public extension CliClient {
func installDependencies(
quiet: Bool = false,
shell: String? = nil
shell: String? = nil,
extraArgs: [String]? = nil
) async throws {
guard let url = Bundle.module.url(forResource: "Brewfile", withExtension: nil) else {
throw CliClientError.brewfileNotFound
}
var arguments = [
"brew", "bundle",
"--file", url.cleanFilePath
]
if let extraArgs {
arguments.append(contentsOf: extraArgs)
}
try await runCommand(
quiet: quiet,
shell: shell.orDefault,
"brew", "bundle",
"--file", url.cleanFilePath
arguments
)
}