feat: Adds install-dependencies command.
This commit is contained in:
23
Sources/hpa/UtilsCommands/InstallDependenciesCommand.swift
Normal file
23
Sources/hpa/UtilsCommands/InstallDependenciesCommand.swift
Normal file
@@ -0,0 +1,23 @@
|
||||
import ArgumentParser
|
||||
import CliClient
|
||||
import CliDoc
|
||||
import Dependencies
|
||||
|
||||
struct InstallDependenciesCommand: AsyncParsableCommand {
|
||||
static let commandName: String = "install-dependencies"
|
||||
|
||||
static let configuration = CommandConfiguration(
|
||||
commandName: commandName,
|
||||
abstract: createAbstract("Ensure required dependencies are installed"),
|
||||
discussion: Discussion {
|
||||
Note {
|
||||
"Homebrew is required to install dependencies."
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
func run() async throws {
|
||||
@Dependency(\.cliClient) var cliClient
|
||||
try await cliClient.installDependencies()
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,8 @@ struct UtilsCommand: AsyncParsableCommand {
|
||||
""",
|
||||
subcommands: [
|
||||
GenerateProjectTemplateCommand.self,
|
||||
GenerateConfigurationCommand.self
|
||||
GenerateConfigurationCommand.self,
|
||||
InstallDependenciesCommand.self
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user