mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 02:11:53 +00:00
add comments about cli output
This commit is contained in:
@@ -364,6 +364,7 @@ upload (Upload name mpkg shouldIndex) = do
|
|||||||
manager <- newTlsManager
|
manager <- newTlsManager
|
||||||
res <- getResponseBody <$> runReaderT (httpLbs withBody) manager
|
res <- getResponseBody <$> runReaderT (httpLbs withBody) manager
|
||||||
if LB.null res
|
if LB.null res
|
||||||
|
-- no output is successful
|
||||||
then pure ()
|
then pure ()
|
||||||
else do
|
else do
|
||||||
$logError (decodeUtf8 $ LB.toStrict res)
|
$logError (decodeUtf8 $ LB.toStrict res)
|
||||||
@@ -394,6 +395,7 @@ index name pkg v = do
|
|||||||
<&> applyBasicAuth (B8.pack publishCfgRepoUser) (B8.pack publishCfgRepoPass)
|
<&> applyBasicAuth (B8.pack publishCfgRepoUser) (B8.pack publishCfgRepoPass)
|
||||||
let withBody = setRequestBodyJSON (IndexPkgReq (PkgId $ toS pkg) v) noBody
|
let withBody = setRequestBodyJSON (IndexPkgReq (PkgId $ toS pkg) v) noBody
|
||||||
res <- getResponseBody <$> httpLBS withBody
|
res <- getResponseBody <$> httpLBS withBody
|
||||||
|
-- no output is successful
|
||||||
if LB.null res then pure () else $logError (decodeUtf8 $ LB.toStrict res) *> exitWith (ExitFailure 1)
|
if LB.null res then pure () else $logError (decodeUtf8 $ LB.toStrict res) *> exitWith (ExitFailure 1)
|
||||||
|
|
||||||
|
|
||||||
@@ -406,6 +408,7 @@ deindex name pkg v = do
|
|||||||
<&> applyBasicAuth (B8.pack publishCfgRepoUser) (B8.pack publishCfgRepoPass)
|
<&> applyBasicAuth (B8.pack publishCfgRepoUser) (B8.pack publishCfgRepoPass)
|
||||||
let withBody = setRequestBodyJSON (IndexPkgReq (PkgId $ toS pkg) v) noBody
|
let withBody = setRequestBodyJSON (IndexPkgReq (PkgId $ toS pkg) v) noBody
|
||||||
res <- getResponseBody <$> httpLBS withBody
|
res <- getResponseBody <$> httpLBS withBody
|
||||||
|
-- no output is successful
|
||||||
if LB.null res then pure () else $logError (decodeUtf8 $ LB.toStrict res) *> exitWith (ExitFailure 1)
|
if LB.null res then pure () else $logError (decodeUtf8 $ LB.toStrict res) *> exitWith (ExitFailure 1)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user