feat: fixes install dependencies to use texlive
This commit is contained in:
@@ -23,14 +23,18 @@ public extension CliClient {
|
|||||||
try await runCommand(quiet: quiet, shell: shell, args)
|
try await runCommand(quiet: quiet, shell: shell, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
func installDependencies() async throws {
|
func installDependencies(
|
||||||
|
quiet: Bool = false,
|
||||||
|
shell: String? = nil
|
||||||
|
) async throws {
|
||||||
guard let url = Bundle.module.url(forResource: "Brewfile", withExtension: nil) else {
|
guard let url = Bundle.module.url(forResource: "Brewfile", withExtension: nil) else {
|
||||||
throw CliClientError.brewfileNotFound
|
throw CliClientError.brewfileNotFound
|
||||||
}
|
}
|
||||||
try await runCommand(
|
try await runCommand(
|
||||||
quiet: false,
|
quiet: quiet,
|
||||||
shell: .zsh(useDashC: true),
|
shell: shell.orDefault,
|
||||||
"brew", "bundle", "--file", url.cleanFilePath
|
"brew", "bundle",
|
||||||
|
"--file", url.cleanFilePath
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
brew "ansible"
|
brew "ansible"
|
||||||
brew "imagemagick"
|
brew "imagemagick"
|
||||||
cask "mactex-no-gui"
|
|
||||||
brew "pandoc"
|
brew "pandoc"
|
||||||
|
brew "texlive"
|
||||||
|
|||||||
@@ -10,14 +10,26 @@ struct InstallDependenciesCommand: AsyncParsableCommand {
|
|||||||
commandName: commandName,
|
commandName: commandName,
|
||||||
abstract: createAbstract("Ensure required dependencies are installed"),
|
abstract: createAbstract("Ensure required dependencies are installed"),
|
||||||
discussion: Discussion {
|
discussion: Discussion {
|
||||||
Note {
|
VStack {
|
||||||
"Homebrew is required to install dependencies."
|
Note {
|
||||||
|
"Homebrew is required to install dependencies."
|
||||||
|
}
|
||||||
|
HStack {
|
||||||
|
"See Also:".yellow.bold.underline
|
||||||
|
"https://brew.sh"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.separator(.newLine(count: 2))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func run() async throws {
|
@OptionGroup var globals: BasicGlobalOptions
|
||||||
|
|
||||||
|
mutating func run() async throws {
|
||||||
@Dependency(\.cliClient) var cliClient
|
@Dependency(\.cliClient) var cliClient
|
||||||
try await cliClient.installDependencies()
|
try await cliClient.installDependencies(
|
||||||
|
quiet: globals.quiet,
|
||||||
|
shell: globals.shell
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user