@@ -90,23 +90,27 @@ main = do
90
90
updaterData = getUpdaterData launcherOptions
91
91
92
92
-- where to generate the certificates
93
- let tlsPath :: TLSPath
94
- tlsPath = TLSPath $ loTlsPath launcherOptions
95
-
96
- -- | If we need to, we first check if there are certificates so we don't have
97
- -- to generate them. Since the function is called `generate...`, that's what
98
- -- it does, it generates the certificates.
99
- eTLSGeneration <- generateTlsCertificates
100
- loggingDependencies
101
- configurationOptions
102
- tlsPath
103
-
104
- case eTLSGeneration of
105
- Left generationError -> do
106
- Trace. logError baseTrace $
107
- " Error occured while generating TLS certificates: " <> show generationError
108
- throwM $ FailedToGenerateTLS generationError
109
- Right _ -> return ()
93
+ let mTlsPath :: Maybe TLSPath
94
+ mTlsPath = TLSPath <$> loTlsPath launcherOptions
95
+
96
+
97
+ case mTlsPath of
98
+ Just tlsPath -> do
99
+ -- | If we need to, we first check if there are certificates so we don't have
100
+ -- to generate them. Since the function is called `generate...`, that's what
101
+ -- it does, it generates the certificates.
102
+ eTLSGeneration <- generateTlsCertificates
103
+ loggingDependencies
104
+ configurationOptions
105
+ tlsPath
106
+
107
+ case eTLSGeneration of
108
+ Left generationError -> do
109
+ Trace. logError baseTrace $
110
+ " Error occured while generating TLS certificates: " <> show generationError
111
+ throwM $ FailedToGenerateTLS generationError
112
+ Right _ -> return ()
113
+ Nothing -> pure () -- TLS generation has been disabled
110
114
111
115
-- In the case the user wants to avoid installing the update now, we
112
116
-- run the update (if there is one) when we have it downloaded.
0 commit comments