Added the CreateFoldersTasks task into the "run()" function for the CreateCommand command in the app target.

This commit is contained in:
Javier Cicchelli 2025-01-13 00:36:56 +01:00
parent d065425c69
commit df556f83ab

View File

@ -12,7 +12,7 @@ extension Colibri {
helpNames: .shortAndLong, helpNames: .shortAndLong,
aliases: ["create"] aliases: ["create"]
) )
@OptionGroup var options: Options @OptionGroup var options: Options
// MARK: Functions // MARK: Functions
@ -20,13 +20,14 @@ extension Colibri {
mutating func run() async throws { mutating func run() async throws {
let fileService = FileService() let fileService = FileService()
let createRootFolder = CreateRootFolderTask(fileService: fileService) let createRootFolder = CreateRootFolderTask(fileService: fileService)
let createFolders = CreateFoldersTask(fileService: fileService)
let rootFolder = try await createRootFolder( let rootFolder = try await createRootFolder(
name: options.name, name: options.name,
at: options.locationURL at: options.locationURL
) )
print(rootFolder) try await createFolders(at: rootFolder)
} }
} }