feat: Working on moving commands to cli-client
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import ArgumentParser
|
||||
import CliClient
|
||||
import Dependencies
|
||||
|
||||
struct DecryptCommand: AsyncParsableCommand {
|
||||
|
||||
@@ -17,15 +19,23 @@ struct DecryptCommand: AsyncParsableCommand {
|
||||
)
|
||||
var output: String?
|
||||
|
||||
// FIX:
|
||||
mutating func run() async throws {
|
||||
@Dependency(\.cliClient) var cliClient
|
||||
|
||||
var args = ["decrypt"]
|
||||
if let output {
|
||||
args.append(contentsOf: ["--output", output])
|
||||
}
|
||||
try await runVault(
|
||||
commandName: Self.commandName,
|
||||
options: options,
|
||||
args
|
||||
|
||||
try await cliClient.runVaultCommand(
|
||||
options.vaultOptions(arguments: args, configuration: nil)
|
||||
)
|
||||
|
||||
// try await runVault(
|
||||
// commandName: Self.commandName,
|
||||
// options: options,
|
||||
// args
|
||||
// )
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user