Conformed the CreateOptions model in the executable target to the Locationable protocol.
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
import ArgumentParser
|
import ArgumentParser
|
||||||
import Foundation
|
import ColibriLibrary
|
||||||
|
|
||||||
extension Colibri.Create {
|
extension Colibri.Create {
|
||||||
struct Options: ParsableArguments {
|
struct Options: ParsableArguments, Locationable {
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
@@ -12,11 +12,5 @@ extension Colibri.Create {
|
|||||||
@Option(name: .shortAndLong)
|
@Option(name: .shortAndLong)
|
||||||
var location: String?
|
var location: String?
|
||||||
|
|
||||||
// MARK: Computed
|
|
||||||
|
|
||||||
var locationURL: URL? {
|
|
||||||
location.flatMap { URL(fileURLWithPath: $0) }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user