File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import SotoS3
33import Logging
44import libhostmgr
55
6+ @main
67struct Hostmgr : ParsableCommand {
78
89 private static var appVersion = " 0.14.2 "
@@ -18,11 +19,22 @@ struct Hostmgr: ParsableCommand {
1819 SetCommand . self,
1920 BenchmarkCommand . self,
2021 ConfigCommand . self
21- ] )
22- }
22+ ]
23+ )
24+
25+ mutating func run( ) throws {
26+ Logger . initializeLoggingSystem ( )
27+
28+ logger. trace ( " Starting Up " )
2329
24- Logger . initializeLoggingSystem ( )
25- Hostmgr . main ( )
30+ guard Configuration . isValid else {
31+ print ( " Invalid configuration – exiting " )
32+ throw ExitCode ( 1 )
33+ }
34+
35+ throw CleanExit . helpRequest ( self )
36+ }
37+ }
2638
2739struct SetCommand : ParsableCommand {
2840 static let configuration = CommandConfiguration (
You can’t perform that action at this time.
0 commit comments