seek o = commandAction (start o)
start :: UpgradeOptions -> CommandStart
-start (UpgradeOptions { autoOnly = True }) = do
+start (UpgradeOptions { autoOnly = True }) =
starting "upgrade" (ActionItemOther Nothing) (SeekInput []) $ do
- getVersion >>= maybe noop checkUpgrade
- next $ return True
-start _ = starting "upgrade" (ActionItemOther Nothing) (SeekInput []) $ do
- whenM (isNothing <$> getVersion) $ do
- initialize Nothing Nothing
- r <- upgrade False latestVersion
- next $ return r
+ getVersion >>= maybe noop checkUpgrade
+ next $ return True
+start _ =
+ starting "upgrade" (ActionItemOther Nothing) (SeekInput []) $ do
+ whenM (isNothing <$> getVersion) $ do
+ initialize Nothing Nothing
+ r <- upgrade False latestVersion
+ next $ return r
let endpoint' = addbasicauth (Git.credentialBasicAuth cred) endpoint
let testreq' = LFS.startTransferRequest endpoint' transfernothing
flip catchNonAsync (const (returnendpoint endpoint')) $ do
- resp' <- makeSmallAPIRequest testreq'
- inRepo $ if needauth (responseStatus resp')
- then Git.rejectUrlCredential cred
- else Git.approveUrlCredential cred
- returnendpoint endpoint'
+ resp' <- makeSmallAPIRequest testreq'
+ inRepo $ if needauth (responseStatus resp')
+ then Git.rejectUrlCredential cred
+ else Git.approveUrlCredential cred
+ returnendpoint endpoint'
else returnendpoint endpoint
where
transfernothing = LFS.TransferRequest
DAV (>= 1.0)
CC-Options: -Wall
GHC-Options: -Wall -fno-warn-tabs -Wincomplete-uni-patterns
- Default-Language: Haskell98
+ Default-Language: Haskell2010
Default-Extensions: PackageImports, LambdaCase
Other-Extensions: TemplateHaskell
-- Some things don't work with the non-threaded RTS.