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

@@ -34,9 +34,9 @@ struct GenerateProjectTemplateCommand: AsyncParsableCommand {
var path: String
@Argument(
help: "Extra arguments passed to the playbook."
help: "Extra arguments / options passed to the playbook."
)
var extraArgs: [String] = []
var extraOptions: [String] = []
mutating func run() async throws {
@Dependency(\.cliClient) var cliClient

View File

@@ -9,6 +9,7 @@ struct InstallDependenciesCommand: AsyncParsableCommand {
static let configuration = CommandConfiguration(
commandName: commandName,
abstract: createAbstract("Ensure required dependencies are installed"),
usage: .default(commandName: commandName, parentCommand: "utils", usesArguments: false),
discussion: Discussion {
VStack {
Note {
@@ -18,6 +19,7 @@ struct InstallDependenciesCommand: AsyncParsableCommand {
"See Also:".yellow.bold.underline
"https://brew.sh"
}
ImportantNote.passingExtraArgs
}
.separator(.newLine(count: 2))
}
@@ -25,11 +27,17 @@ struct InstallDependenciesCommand: AsyncParsableCommand {
@OptionGroup var globals: BasicGlobalOptions
@Argument(
help: "Extra arguments / options to pass to the homebrew command."
)
var extraOptions: [String]
mutating func run() async throws {
@Dependency(\.cliClient) var cliClient
try await cliClient.installDependencies(
quiet: globals.quiet,
shell: globals.shell
shell: globals.shell,
extraArgs: extraOptions
)
}
}