File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ class Delegate: NSObject, CLLocationManagerDelegate {
140140 func help( ) {
141141 print ( """
142142 USAGE: CoreLocationCLI --help
143+ CoreLocationCLI --version
143144 CoreLocationCLI [--watch] [--verbose] [--format FORMAT]
144145 CoreLocationCLI [--watch] [--verbose] --json
145146
@@ -179,6 +180,11 @@ class Delegate: NSObject, CLLocationManagerDelegate {
179180 compatible with the JSON Lines text format.
180181 """ )
181182 }
183+
184+ func version( ) {
185+ let version = Bundle . main. infoDictionary ? [ " CFBundleShortVersionString " ] as? String ?? " Unknown "
186+ print ( " CoreLocationCLI version \( version) " )
187+ }
182188}
183189
184190let delegate = Delegate ( )
@@ -187,6 +193,9 @@ for (i, argument) in ProcessInfo().arguments.enumerated() {
187193 case " -h " , " --help " :
188194 delegate. help ( )
189195 exit ( 0 )
196+ case " --version " :
197+ delegate. version ( )
198+ exit ( 0 )
190199 case " -w " , " --watch " :
191200 delegate. follow = true
192201 case " -v " , " --verbose " :
You can’t perform that action at this time.
0 commit comments